Comments (2)
Why not js/ts as always ?
In godot engine a Script is treaded as a class extends from godot.Object
. So only a script export a class that extends from godot.Object
is a valid godot script.
The godot editor always tries to parse all files with valid script extension as a godot class. But most of our .js files in project are not aimmed to be used by Node so they don't extends from godot.Object
. In editor side the script is not a Script.
Therefore, I have to sperate them to two resource type. Scripts that can be mounted to Node use .jsx extension, to avoid the editor constantly trying to parse the .js files into classes.
Why is JSX/TSX ?
Because typescript can only compile files from ts to js and tsx to jsx.
from ecmascript.
Thanks for the response, fair enough that makes sense :)
I guess you could opt to use a sort of "sub-extension" in a way, for example my-script.godot.js
or my-script.godot.ts
which could work. Either way it's not much of a big deal, guess this ticket can be closed 👍
from ecmascript.
Related Issues (20)
- CommonJS Module Support HOT 4
- Steps needs to run wasm HOT 1
- [Suggestion] Documentation and getting started tutorial HOT 8
- dev is ok , when i build get error below HOT 1
- Refactor repo branches to enable good publish process HOT 9
- Close issues that refer to Godot Engine 3 but don't exist in Godot Engine 4 HOT 1
- [4.1-v0.0.17] Signal arguments makes it crash HOT 4
- Get started page 404 HOT 2
- Configuring esbuild for bundling classes issue HOT 1
- Missing template / examples for pre-release HOT 3
- Can I add this to an existing godot install? HOT 1
- .d.ts file has errors HOT 6
- Condition "!is_inside_tree()" is true. HOT 2
- Master build does not build with Godot HOT 2
- Unicode parsing error: Invalid unicode codepoint (fffd), cannot represent as ASCII/Latin-1 HOT 1
- Global pollution HOT 2
- Creating an object in js lost all built-in function links
- [BUMP] GodotJS addon: CSS integration
- 4.2+ support HOT 1
- Is it dead? 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 ecmascript.