Commit 31044481 authored by 邱旭's avatar 邱旭

增加shader编译错误打印shader代码

parent b068d4b0
This diff is collapsed.
This diff is collapsed.
...@@ -7488,7 +7488,8 @@ ...@@ -7488,7 +7488,8 @@
gl.shaderSource(shader, src); gl.shaderSource(shader, src);
gl.compileShader(shader); gl.compileShader(shader);
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
console.log(gl.getShaderInfoLog(shader)); console.error(src);
console.error(gl.getShaderInfoLog(shader));
return null; return null;
} }
return shader; return shader;
...@@ -13908,7 +13909,7 @@ ...@@ -13908,7 +13909,7 @@
*/ */
_this.renderObj = null; _this.renderObj = null;
/** /**
* 相对于stage的可见区域,考虑不对外开放,但是有些地方又有用,比如某点是否在舞台可见区域内viewRect.isPointIn(gp) * 舞台在设备里截取后的可见区域,有些时候知道可见区域是非常重要的,因为这样你就可以根据舞台的可见区域做自适应了。
* @property viewRect * @property viewRect
* @public * @public
* @since 1.0.0 * @since 1.0.0
...@@ -14015,6 +14016,7 @@ ...@@ -14015,6 +14016,7 @@
_this.canvas = canvas; _this.canvas = canvas;
var s = _this; var s = _this;
_this._instanceType = "Stage"; _this._instanceType = "Stage";
Stage._stageList["canvas"] = s;
s.stage = _this; s.stage = _this;
s.name = "stageInstance_" + s.instanceId; s.name = "stageInstance_" + s.instanceId;
s.desWidth = desWidth; s.desWidth = desWidth;
...@@ -14088,6 +14090,17 @@ ...@@ -14088,6 +14090,17 @@
// }, 200) // }, 200)
// } // }
} }
/**
* 直接获取stage的引用,避免总是从Event.ADD_TO_STAGE 事件中去获取stage引用
* @property getStage
* @param {string} stageName
* @return {any}
* @since 2.0.0
*/
Stage.getStage = function (stageName) {
if (stageName === void 0) { stageName = "cusEngine"; }
return Stage._stageList[stageName];
};
Object.defineProperty(Stage.prototype, "bgColor", { Object.defineProperty(Stage.prototype, "bgColor", {
/** /**
* 舞台的背景色,暂时无效,渲染器默认透明背景,且webgl模式下clearColor不会跟着修改,TODO 以后修改 * 舞台的背景色,暂时无效,渲染器默认透明背景,且webgl模式下clearColor不会跟着修改,TODO 以后修改
...@@ -14578,6 +14591,13 @@ ...@@ -14578,6 +14591,13 @@
s._ml = null; s._ml = null;
_super.prototype.destroy.call(this); _super.prototype.destroy.call(this);
}; };
/**
* @property _stageList
* @static
* @type {Object}
* @private
*/
Stage._stageList = {};
return Stage; return Stage;
}(Container)); }(Container));
...@@ -32531,9 +32551,9 @@ ...@@ -32531,9 +32551,9 @@
if (frontVert) if (frontVert)
frontVert += "\n"; frontVert += "\n";
var frontFrag = [ var frontFrag = [
parameters.useNormalMap ? '#extension GL_OES_standard_derivatives : enable' : '',
'precision ' + parameters.precision + ' float;', 'precision ' + parameters.precision + ' float;',
'precision ' + parameters.precision + ' int;', 'precision ' + parameters.precision + ' int;',
parameters.useNormalMap ? '#extension GL_OES_standard_derivatives : enable' : '',
parameters.lightAffect ? '#define USE_LIGHT' : '', parameters.lightAffect ? '#define USE_LIGHT' : '',
parameters.useMap ? '#define USE_MAP' : '', parameters.useMap ? '#define USE_MAP' : '',
parameters.useNormalMap ? '#define USE_NORMAL_MAP' : '', parameters.useNormalMap ? '#define USE_NORMAL_MAP' : '',
...@@ -32953,7 +32973,7 @@ ...@@ -32953,7 +32973,7 @@
" #ifdef USE_MAP", " #ifdef USE_MAP",
" vec4 mapColor = texture2D( uMap, vTextureCoord );", " vec4 mapColor = texture2D( uMap, vTextureCoord );",
" color *= mapColor;", " color *= mapColor;",
" vec2 s = step(vec2(uFrameUvs.x,uFrameUvs.y),vTextureCoord) - step(vec2(uFrameUvs.z,uFrameUvs.w),vTextureCoord);", " vec2 s = step(vec2(uFrameUvs.x, uFrameUvs.y),vTextureCoord) - step(vec2(uFrameUvs.z, uFrameUvs.w), vTextureCoord);",
// " vec2 s = step(vec2(0.6669921875,0.4111328125),vTextureCoord) - step(vec2(0.951171875,0.65625),vTextureCoord);", // " vec2 s = step(vec2(0.6669921875,0.4111328125),vTextureCoord) - step(vec2(0.951171875,0.65625),vTextureCoord);",
" color *= abs(s.x * s.y);", " color *= abs(s.x * s.y);",
" #endif", " #endif",
...@@ -33118,20 +33138,21 @@ ...@@ -33118,20 +33138,21 @@
if (!obj.geometry || !obj.material) if (!obj.geometry || !obj.material)
return; return;
var mat = obj.material; var mat = obj.material;
obj.geometry; var meshes = this.meshes;
//提取渲染对象及材质,分组渲染,怎么考虑同一个geometry只需要处理一次attr, //提取渲染对象及材质,分组渲染,怎么考虑同一个geometry只需要处理一次attr,
//分组按 //分组按
// if (!this.meshes.length) { // if (!this.meshes.length) {
// this.meshes.push(obj); // this.meshes.push(obj);
// } else { // } else {
for (var i = 0; i < this.meshes.length; i++) { var len = meshes.length;
if (this.meshes[i].material == mat) { //没啥软用 for (var i = 0; i < len; i++) {
this.meshes.splice(i, 0, obj); if (meshes[i].material == mat) { //没啥软用
meshes.splice(i, 0, obj);
return; return;
} }
} }
// } // }
this.meshes.push(obj); meshes.push(obj);
}; };
D3Renderer.prototype.flush = function () { D3Renderer.prototype.flush = function () {
//生成一张阴影的深度贴图 //生成一张阴影的深度贴图
...@@ -33169,6 +33190,13 @@ ...@@ -33169,6 +33190,13 @@
//模型矩阵也默认加上 //模型矩阵也默认加上
if (uniforms["uModelMatrix"]) if (uniforms["uModelMatrix"])
uniforms["uModelMatrix"] = mesh._worldMatrix.toArray(); uniforms["uModelMatrix"] = mesh._worldMatrix.toArray();
if (uniforms.uNormalMatrix) {
var modelViewMatrix_1 = tempMatrix4.multiplyMatrices(this.camera.worldMatrixInverse, mesh._worldMatrix);
var normalMatrix_1 = modelViewMatrix_1.invert().transpose();
// var normalMatrix = mesh._worldMatrix.invert().transpose();
uniforms["uNormalMatrix"] = normalMatrix_1.toArray();
// this.setShaderUniform(curShader, "uNormalMatrix", normalMatrix.toArray());
}
//处理所有自定义属性 //处理所有自定义属性
for (var u in cusUniforms) { for (var u in cusUniforms) {
var uniform = cusUniforms[u]; var uniform = cusUniforms[u];
...@@ -39567,6 +39595,10 @@ ...@@ -39567,6 +39595,10 @@
exports.FloatDisplay = FloatDisplay; exports.FloatDisplay = FloatDisplay;
exports.FpsPanel = FpsPanel; exports.FpsPanel = FpsPanel;
exports.FrameAni = FrameAni; exports.FrameAni = FrameAni;
exports.GLBuffer = GLBuffer;
exports.GLFramebuffer = GLFramebuffer;
exports.GLShader = GLShader;
exports.GLTexture = GLTexture;
exports.Geometry = Geometry; exports.Geometry = Geometry;
exports.GlobalLoader = GlobalLoader; exports.GlobalLoader = GlobalLoader;
exports.Graphics = Graphics; exports.Graphics = Graphics;
...@@ -39627,20 +39659,24 @@ ...@@ -39627,20 +39659,24 @@
exports.VERSION = VERSION; exports.VERSION = VERSION;
exports.Vector2 = Vector2; exports.Vector2 = Vector2;
exports.Vector3 = Vector3; exports.Vector3 = Vector3;
exports.VertexArrayObject = VertexArrayObject;
exports.WebglRenderer = WebglRenderer; exports.WebglRenderer = WebglRenderer;
exports.abs = abs; exports.abs = abs;
exports.calculatePlaneIndices = calculatePlaneIndices; exports.calculatePlaneIndices = calculatePlaneIndices;
exports.cancelAnimationFrame = cancelAnimationFrame; exports.cancelAnimationFrame = cancelAnimationFrame;
exports.checkMaxIfStatementsInShader = checkMaxIfStatementsInShader;
exports.clamp = clamp; exports.clamp = clamp;
exports.clearTextureCache = clearTextureCache; exports.clearTextureCache = clearTextureCache;
exports.cos = cos; exports.cos = cos;
exports.countTrailingZeros = countTrailingZeros; exports.countTrailingZeros = countTrailingZeros;
exports.createCanvas = createCanvas; exports.createCanvas = createCanvas;
exports.createContext = createContext;
exports.createImage = createImage; exports.createImage = createImage;
exports.createTextureSheet = createTextureSheet; exports.createTextureSheet = createTextureSheet;
exports.createTexturesByAtlas = createTexturesByAtlas; exports.createTexturesByAtlas = createTexturesByAtlas;
exports.decodeText = decodeText; exports.decodeText = decodeText;
exports.defaultFragmentShader3d = defaultFragmentShader3d; exports.defaultFragmentShader3d = defaultFragmentShader3d;
exports.defaultValue = defaultValue;
exports.defaultVertexShader3d = defaultVertexShader3d; exports.defaultVertexShader3d = defaultVertexShader3d;
exports.deinterleave2 = deinterleave2; exports.deinterleave2 = deinterleave2;
exports.deinterleave3 = deinterleave3; exports.deinterleave3 = deinterleave3;
This diff is collapsed.
...@@ -176,22 +176,3 @@ function checkIntersection( ...@@ -176,22 +176,3 @@ function checkIntersection(
object: object object: object
}; };
} }
//交付分
var a = 5
//时间分每天
var b = 1
//极限时间
var j = 15
//项目基础时间
var i = 4
function aaa(t) {
t -= i
return a + t * b + (t * t) / j * a / i / i;
}
function bbb(t) {
//完整项目按4天
t -= i
return a + t * b + (t * t) / j * a / i / i;
}
\ No newline at end of file
import { EventDispatcher } from "../../2d/events"; import {EventDispatcher} from "../../2d/events";
import { GlobalLoader } from "../../2d/loader"; import {GlobalLoader} from "../../2d/loader";
import { rgb2hex, decodeText, ArrayBufferToBase64 } from "../../2d/utils"; import {rgb2hex, decodeText, ArrayBufferToBase64} from "../../2d/utils";
import { LightMaterial } from "../materials/LightMaterial"; import {LightMaterial} from "../materials/LightMaterial";
import { Geometry } from "../Geometry"; import {Geometry} from "../Geometry";
import { Texture } from "../../2d/texture"; import {Texture} from "../../2d/texture";
import { Scene3D } from "../Scene3D"; import {Scene3D} from "../Scene3D";
import { Object3D } from "../Object3D"; import {Object3D} from "../Object3D";
import { BaseMaterial, BaseMaterialParamsInt, RenderSideType } from "../materials/BaseMaterial"; import {BaseMaterial, BaseMaterialParamsInt, RenderSideType} from "../materials/BaseMaterial";
import { Mesh3D } from "../Mesh3D"; import {Mesh3D} from "../Mesh3D";
import { PerspectiveCamera } from "../cameras/PerspectiveCamera"; import {PerspectiveCamera} from "../cameras/PerspectiveCamera";
import { RAD_TO_DEG } from "../../2d/const"; import {RAD_TO_DEG} from "../../2d/const";
import { Matrix4 } from "../math/Matrix4"; import {Matrix4} from "../math/Matrix4";
import { arraySlice } from "../animation/utils"; import {arraySlice} from "../animation/utils";
import { InterpolateSmooth, InterpolateLinear, InterpolateDiscrete } from "../animation/utils"; import {InterpolateSmooth, InterpolateLinear, InterpolateDiscrete} from "../animation/utils";
import { AnimationType3D, AnimationTrack3D } from "../animation/AnimationTrack3D"; import {AnimationType3D, AnimationTrack3D} from "../animation/AnimationTrack3D";
// import { AnimationClip3D } from "../animation/AnimationClip3D"; // import { AnimationClip3D } from "../animation/AnimationClip3D";
import { Camera } from "../cameras/Camera"; import {Camera} from "../cameras/Camera";
import { SkinnedMesh3D } from "../bones/SkinnedMesh3D"; import {SkinnedMesh3D} from "../bones/SkinnedMesh3D";
import { Skeleton3D } from "../bones/Skeleton3D"; import {Skeleton3D} from "../bones/Skeleton3D";
import { Bone3D } from "../bones/Bone3D"; import {Bone3D} from "../bones/Bone3D";
import { AnimationClip } from "../../2d/AnimationClip"; import {AnimationClip} from "../../2d/AnimationClip";
import { AnimationManager } from "../../2d/AnimationManager"; import {AnimationManager} from "../../2d/AnimationManager";
import { atob_base64Decode } from "./base64"; import {atob_base64Decode} from "./base64";
// var THREE: any = {} // var THREE: any = {}
/* BINARY EXTENSION */ /* BINARY EXTENSION */
...@@ -30,7 +30,7 @@ import { atob_base64Decode } from "./base64"; ...@@ -30,7 +30,7 @@ import { atob_base64Decode } from "./base64";
var BINARY_EXTENSION_BUFFER_NAME = 'binary_glTF'; var BINARY_EXTENSION_BUFFER_NAME = 'binary_glTF';
var BINARY_EXTENSION_HEADER_MAGIC = 'glTF';//这个用到了 var BINARY_EXTENSION_HEADER_MAGIC = 'glTF';//这个用到了
var BINARY_EXTENSION_HEADER_LENGTH = 12; var BINARY_EXTENSION_HEADER_LENGTH = 12;
var BINARY_EXTENSION_CHUNK_TYPES = { JSON: 0x4E4F534A, BIN: 0x004E4942 }; var BINARY_EXTENSION_CHUNK_TYPES = {JSON: 0x4E4F534A, BIN: 0x004E4942};
/*********************************/ /*********************************/
/********** EXTENSIONS ***********/ /********** EXTENSIONS ***********/
...@@ -676,6 +676,7 @@ class GLTFParser { ...@@ -676,6 +676,7 @@ class GLTFParser {
primitiveCache = []; primitiveCache = [];
multiplePrimitivesCache = []; multiplePrimitivesCache = [];
multiPassGeometryCache = []; multiPassGeometryCache = [];
constructor( constructor(
public json: any = {}, public json: any = {},
public extensions = {}, public extensions = {},
...@@ -688,6 +689,7 @@ class GLTFParser { ...@@ -688,6 +689,7 @@ class GLTFParser {
// this.fileLoader = new THREE.FileLoader(this.options.manager); // this.fileLoader = new THREE.FileLoader(this.options.manager);
// this.fileLoader.setResponseType('arraybuffer'); // this.fileLoader.setResponseType('arraybuffer');
} }
parse(onLoad, onError) { parse(onLoad, onError) {
var json = this.json; var json = this.json;
...@@ -715,6 +717,7 @@ class GLTFParser { ...@@ -715,6 +717,7 @@ class GLTFParser {
}).catch(onError); }).catch(onError);
} }
/** /**
* Marks the special nodes/meshes in json for efficient parse. * Marks the special nodes/meshes in json for efficient parse.
*/ */
...@@ -776,6 +779,7 @@ class GLTFParser { ...@@ -776,6 +779,7 @@ class GLTFParser {
this.json.meshUses = meshUses; this.json.meshUses = meshUses;
} }
/** /**
* Requests the specified dependency asynchronously, with caching. * Requests the specified dependency asynchronously, with caching.
* @param {string} type * @param {string} type
...@@ -1310,6 +1314,10 @@ class GLTFParser { ...@@ -1310,6 +1314,10 @@ class GLTFParser {
pending.push(parser.assignTexture(materialParams, 'map', metallicRoughness.baseColorTexture.index)); pending.push(parser.assignTexture(materialParams, 'map', metallicRoughness.baseColorTexture.index));
} }
if (materialDef.normalTexture !== undefined) {
pending.push(parser.assignTexture(materialParams, 'normalMap', materialDef.normalTexture.index));
}
// materialParams.metalness = metallicRoughness.metallicFactor !== undefined ? metallicRoughness.metallicFactor : 1.0; // materialParams.metalness = metallicRoughness.metallicFactor !== undefined ? metallicRoughness.metallicFactor : 1.0;
// materialParams.roughness = metallicRoughness.roughnessFactor !== undefined ? metallicRoughness.roughnessFactor : 1.0; // materialParams.roughness = metallicRoughness.roughnessFactor !== undefined ? metallicRoughness.roughnessFactor : 1.0;
...@@ -1385,7 +1393,7 @@ class GLTFParser { ...@@ -1385,7 +1393,7 @@ class GLTFParser {
// } // }
return Promise.all(pending).then(function () { return Promise.all(pending).then(function (v) {
var material: BaseMaterial; var material: BaseMaterial;
...@@ -1499,7 +1507,7 @@ class GLTFParser { ...@@ -1499,7 +1507,7 @@ class GLTFParser {
var geometryPromise: any = Promise.resolve(geometry); var geometryPromise: any = Promise.resolve(geometry);
// Cache this geometry // Cache this geometry
cache.push({ primitive: primitive, promise: geometryPromise }); cache.push({primitive: primitive, promise: geometryPromise});
pending.push(geometryPromise); pending.push(geometryPromise);
...@@ -1932,7 +1940,7 @@ class GLTFParser { ...@@ -1932,7 +1940,7 @@ class GLTFParser {
var skinDef = this.json.skins[skinIndex]; var skinDef = this.json.skins[skinIndex];
var skinEntry: any = { joints: skinDef.joints }; var skinEntry: any = {joints: skinDef.joints};
if (skinDef.inverseBindMatrices === undefined) { if (skinDef.inverseBindMatrices === undefined) {
...@@ -2552,16 +2560,22 @@ function resolveURL(url, path) { ...@@ -2552,16 +2560,22 @@ function resolveURL(url, path) {
//改成只缓存自己一个praser的,否则多个模型加载会取错缓存 //改成只缓存自己一个praser的,否则多个模型加载会取错缓存
class GLTFRegistry { class GLTFRegistry {
private objects = {} private objects = {}
constructor() { }
constructor() {
}
get(key: string) { get(key: string) {
return this.objects[key]; return this.objects[key];
} }
add(key: string, object: any) { add(key: string, object: any) {
this.objects[key] = object; this.objects[key] = object;
} }
remove(key: string) { remove(key: string) {
delete this.objects[key]; delete this.objects[key];
} }
removeAll() { removeAll() {
this.objects = {}; this.objects = {};
} }
...@@ -2571,6 +2585,7 @@ class GLTFRegistry { ...@@ -2571,6 +2585,7 @@ class GLTFRegistry {
class BufferAttribute { class BufferAttribute {
public count: number; public count: number;
public name: string; public name: string;
/** /**
* *
* @param array Int8Array,Uint8Array, Int16Array,Uint16Array,Uint32Array,Float32Array * @param array Int8Array,Uint8Array, Int16Array,Uint16Array,Uint32Array,Float32Array
...@@ -2587,6 +2602,7 @@ class BufferAttribute { ...@@ -2587,6 +2602,7 @@ class BufferAttribute {
} }
this.count = array !== undefined ? array.length / itemSize : 0; this.count = array !== undefined ? array.length / itemSize : 0;
} }
/** /**
* 重写覆盖 * 重写覆盖
* @param value 普通数组,或类型化数组 * @param value 普通数组,或类型化数组
...@@ -2596,6 +2612,7 @@ class BufferAttribute { ...@@ -2596,6 +2612,7 @@ class BufferAttribute {
this.array.set(value, offset); this.array.set(value, offset);
return this; return this;
} }
/** /**
* 重置数据 * 重置数据
* @param array * @param array
...@@ -2609,6 +2626,7 @@ class BufferAttribute { ...@@ -2609,6 +2626,7 @@ class BufferAttribute {
return this; return this;
} }
/** /**
* *
* @param index 第几个点 * @param index 第几个点
...@@ -2672,6 +2690,7 @@ class BufferAttribute { ...@@ -2672,6 +2690,7 @@ class BufferAttribute {
this.array[index + 3] = w; this.array[index + 3] = w;
return this; return this;
} }
copy(source: BufferAttribute) { copy(source: BufferAttribute) {
this.name = source.name; this.name = source.name;
...@@ -2681,21 +2700,23 @@ class BufferAttribute { ...@@ -2681,21 +2700,23 @@ class BufferAttribute {
this.normalized = source.normalized; this.normalized = source.normalized;
return this; return this;
} }
clone() { clone() {
return new BufferAttribute(this.array, this.itemSize).copy(this); return new BufferAttribute(this.array, this.itemSize).copy(this);
} }
} }
class InterleavedBuffer { class InterleavedBuffer {
public count: number; public count: number;
constructor( constructor(
public array?, public array?,
public stride?: number public stride?: number
) { ) {
this.count = array !== undefined ? array.length / stride : 0; this.count = array !== undefined ? array.length / stride : 0;
} }
setArray(array) { setArray(array) {
if (Array.isArray(array)) { if (Array.isArray(array)) {
...@@ -2710,6 +2731,7 @@ class InterleavedBuffer { ...@@ -2710,6 +2731,7 @@ class InterleavedBuffer {
return this; return this;
}; };
copy(source: InterleavedBuffer) { copy(source: InterleavedBuffer) {
this.array = new source.array.constructor(source.array); this.array = new source.array.constructor(source.array);
this.count = source.count; this.count = source.count;
...@@ -2731,6 +2753,7 @@ class InterleavedBuffer { ...@@ -2731,6 +2753,7 @@ class InterleavedBuffer {
class InterleavedBufferAttribute { class InterleavedBufferAttribute {
data: InterleavedBuffer; data: InterleavedBuffer;
isInterleavedBufferAttribute = true; isInterleavedBufferAttribute = true;
constructor( constructor(
interleavedBuffer: InterleavedBuffer, interleavedBuffer: InterleavedBuffer,
public itemSize: number, public itemSize: number,
...@@ -2739,12 +2762,15 @@ class InterleavedBufferAttribute { ...@@ -2739,12 +2762,15 @@ class InterleavedBufferAttribute {
) { ) {
this.data = interleavedBuffer; this.data = interleavedBuffer;
}; };
get count() { get count() {
return this.data.count; return this.data.count;
} }
get array() { get array() {
return this.data.array; return this.data.array;
} }
setX(index, x) { setX(index, x) {
this.data.array[index * this.data.stride + this.offset] = x; this.data.array[index * this.data.stride + this.offset] = x;
return this; return this;
...@@ -2821,6 +2847,7 @@ function attributeToArray(attr: BufferAttribute) { ...@@ -2821,6 +2847,7 @@ function attributeToArray(attr: BufferAttribute) {
var reservedRe = new RegExp('[' + '\\[\\]\\.:\\/' + ']', 'g'); var reservedRe = new RegExp('[' + '\\[\\]\\.:\\/' + ']', 'g');
function sanitizeNodeName(name) { function sanitizeNodeName(name) {
return name.replace(/\s/g, '_').replace(reservedRe, ''); return name.replace(/\s/g, '_').replace(reservedRe, '');
......
import { Dict } from "../../2d/utils"; import { Dict, hex2rgb } from "../../2d/utils";
import { HashObject } from "../../2d/HashObject"; import { HashObject } from "../../2d/HashObject";
import { WebglRenderer } from "../../2d/renderers/WebglRenderer"; import { WebglRenderer } from "../../2d/renderers/WebglRenderer";
import { GLShader } from "../../glCore"; import { GLShader } from "../../glCore";
...@@ -44,6 +44,30 @@ export class ShaderMaterial extends HashObject { ...@@ -44,6 +44,30 @@ export class ShaderMaterial extends HashObject {
alpha: 1; alpha: 1;
/**
* 十六进制 hex2rgb ,转成0到1的数组
*/
private _color: number = 0xffffff;
private _colorArr: Float32Array = new Float32Array([1.0, 1.0, 1.0]);
get color() {
return this._color;
}
set color(value: number) {
if (this._color === value) return;
this._color = value;
var arr = hex2rgb(value)
this._colorArr[0] = arr[0];
this._colorArr[1] = arr[1];
this._colorArr[2] = arr[2];
}
//获取
get colorArr() {
return this._colorArr;
}
/** /**
* key就是渲染器唯一id * key就是渲染器唯一id
*/ */
......
...@@ -33,6 +33,9 @@ export * from "./tween"; ...@@ -33,6 +33,9 @@ export * from "./tween";
//3D //3D
export * from "./3d"; export * from "./3d";
// glCore
export * from "./glCore";
//spine //spine
export * from "./spine"; export * from "./spine";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment