From 030453cb9ea0d3024a4ae0cddd44a2adcf3efd2a Mon Sep 17 00:00:00 2001 From: Leslie Leigh Date: Tue, 20 Nov 2018 17:42:49 +0800 Subject: [PATCH] rename package (#3535) * impl texture2d using imageasset * texture-cube * fix issue comment * remove initWithElement and initWithData; fix issue comment * define TextureUpdateOpts in gfx/texture-2d.js * optimize some `new ImageAsset`; optimize image-asset; add updateMipmaps() to Texture2D * use onLoaded, remove hack * rename package --- cocos/3d/assets/mesh.js | 6 ++++-- cocos/3d/assets/utils/buffer-range.js | 6 ++++-- cocos/3d/assets/utils/gltf-utils.js | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cocos/3d/assets/mesh.js b/cocos/3d/assets/mesh.js index 9cda47a252..9f6b63ad79 100644 --- a/cocos/3d/assets/mesh.js +++ b/cocos/3d/assets/mesh.js @@ -37,7 +37,7 @@ import BufferRange from "./utils/buffer-range"; * These vertex attributes occupy a range of the buffer and * are interleaved, no padding bytes, in the range. */ -@ccclass("cc.internal.VertexBundle") +@ccclass("cc.VertexBundle") export class VertexBundle { /** * The data range of this bundle. @@ -61,12 +61,13 @@ export class VertexBundle { @property _formats = []; } +cc.VertexBundle = VertexBundle; /** * A primitive is a geometry constituted with a list of * same topology primitive graphic(such as points, lines or triangles). */ -@ccclass("cc.internal.Primitive") +@ccclass("cc.Primitive") export class Primitive { /** @@ -97,6 +98,7 @@ export class Primitive { @property(Number) _topology = gfxEnums.PT_TRIANGLES; } +cc.Primitive = Primitive; @ccclass('cc.Mesh') export default class Mesh extends Asset { diff --git a/cocos/3d/assets/utils/buffer-range.js b/cocos/3d/assets/utils/buffer-range.js index 9ad81808e1..bbd720b2df 100644 --- a/cocos/3d/assets/utils/buffer-range.js +++ b/cocos/3d/assets/utils/buffer-range.js @@ -30,7 +30,7 @@ const { ccclass, property } = _decorator; /** * The class BufferRange denotes a range of the buffer. */ -@ccclass("cc.internal.BufferRange") +@ccclass("cc.BufferRange") export default class BufferRange { /** * The offset of the range. @@ -50,4 +50,6 @@ export default class BufferRange { this._offset = offset; this._length = length; } -} \ No newline at end of file +} + +cc.BufferRange = BufferRange; \ No newline at end of file diff --git a/cocos/3d/assets/utils/gltf-utils.js b/cocos/3d/assets/utils/gltf-utils.js index a2e4c7e2fb..13b9a69215 100644 --- a/cocos/3d/assets/utils/gltf-utils.js +++ b/cocos/3d/assets/utils/gltf-utils.js @@ -692,6 +692,7 @@ export class GltfConverter { /** * @param {number} index * @return {GltfSampler} + * @private */ _requireSampler(index) { if (this._gltf.samplers === undefined) {