Comments (3)
目前 spriteFrame 返回的类型是 __private._cocos_asset_assets_texture_base__TextureBase ... 这是什么?
from cocos-engine.
const node = new Node("New Sprite");
const sprite = node.addComponent(Sprite);
const spriteFrame = new SpriteFrame();
const tex = imageAsset._texture;
spriteFrame.texture = tex;
sprite.spriteFrame = spriteFrame;
node.parent = self.node;
});
spriteFrame.texture 不就是么
from cocos-engine.
const node = new Node("New Sprite"); const sprite = node.addComponent(Sprite); const spriteFrame = new SpriteFrame(); const tex = imageAsset._texture; spriteFrame.texture = tex; sprite.spriteFrame = spriteFrame; node.parent = self.node; });
spriteFrame.texture 不就是么
对 它是. 我 用 as cc.Texture2D 后 能正常使用.
但是官方 cc.d.ts 里告诉我 spriteFrame.texture 的类型是 "__private._cocos_asset_assets_texture_base__TextureBase" 这是什么鬼?
cocos里大量的这种 长的类型, 无法理解.
from cocos-engine.
Related Issues (20)
- Button,ProgressBar,EditBox等的子节点Label,Bar, TEXTLABEL,PLACEHOLDER_LABEL在创建时其layer没有跟随父节点
- (Cocos Creator - CI/CD) Endless build build via cmd on build agent teamcity: Stops at this log and loads endlessly - [Package] [email protected] enable HOT 1
- Forcing SafeAreaEdge to be symmetrical in ScreenAdapter
- Build machine hangs trying to download a cocos-service.zip but we don't use services
- 383 Label and Mask component lead to App crash on Xcode. HOT 1
- 希望编辑器能支持拖拽任意扩展名的文本文件 到 cc.TextAsset属性框上.
- 2D渲染时, 某些情况下会莫名其妙的断批
- [2.4.x, native] Memory leak in WebSocket binding
- Releasing the LMB outside the canvas keeps MouseInput._isPressed boolean true
- "HEADERS_RECEIVED"和"LOADING"这两个状态根本不会设置,实际请求过程中只有“OPENED”“DONE”这两个状态有用到。这里后续会完善吗? HOT 1
- 希望能考虑下出差办公的程序员, 不要"断网不可用"
- 希望能考虑下出差办公的程序员, 不要"断网不可用". HOT 6
- IDE的自动图集预览时, 希望能显示一下生成的图集的尺寸 HOT 1
- 网上平台创建动态网格报错
- tiled-map 的 doCleanupImageCache() 压根不会被执行.
- assetManager.loadAny时 不会先判断缓存里有没有, 这个是缺陷还是故意设计的?
- Please support S3TC for Windows web builds since no existing compression works
- 抖音小游戏安卓平台, 渲染动态合图的RenderTexture 时, alpha的处理出现问题 HOT 1
- CustomPipeLine effect shows Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cocos-engine.