Run godot's formatting script.
@ -34,7 +34,7 @@ Patches that I'm considering
|
||||
- https://github.com/godotengine/godot/pull/39362 - Fix PlaneShape in Godot physics
|
||||
- https://github.com/godotengine/godot/pull/37680 - Editor Debugger: auto scrolling is activated at every log start.
|
||||
|
||||
- https://github.com/godotengine/godot/pull/36776 - [WIP] Editor Android Port
|
||||
- https://github.com/godotengine/godot/pull/36776 - [WIP] Editor Android Port
|
||||
-- 3.x version - https://github.com/thebestnom/godot/commits/android_editor_3.2
|
||||
|
||||
- The full 4.0 TileMap + TileMap Editor rework. (Like the skeleton editor it would become a module)
|
||||
|
@ -647,7 +647,7 @@ if selected_platform in platform_list:
|
||||
if not env["verbose"]:
|
||||
methods.no_verbose(sys, env)
|
||||
|
||||
if not env["platform"] == "server":
|
||||
if not env["platform"] == "server":
|
||||
env.Append(
|
||||
BUILDERS={
|
||||
"GLES2_GLSL": env.Builder(
|
||||
|
@ -476,7 +476,7 @@ public:
|
||||
virtual void environment_set_bg_energy(RID p_env, float p_energy);
|
||||
virtual void environment_set_canvas_max_layer(RID p_env, int p_max_layer);
|
||||
virtual void environment_set_ambient_light(RID p_env, const Color &p_color, float p_energy = 1.0, float p_sky_contribution = 0.0);
|
||||
|
||||
|
||||
virtual void environment_set_dof_blur_near(RID p_env, bool p_enable, float p_distance, float p_transition, float p_amount, VS::EnvironmentDOFBlurQuality p_quality);
|
||||
virtual void environment_set_dof_blur_far(RID p_env, bool p_enable, float p_distance, float p_transition, float p_amount, VS::EnvironmentDOFBlurQuality p_quality);
|
||||
|
||||
|
@ -53,7 +53,7 @@ attribute vec4 color_attrib; // attrib:3
|
||||
attribute vec2 uv_attrib; // attrib:4
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_UV2_INTERP)
|
||||
#if defined(ENABLE_UV2_INTERP)
|
||||
attribute vec2 uv2_attrib; // attrib:5
|
||||
#endif
|
||||
|
||||
@ -391,7 +391,7 @@ void main() {
|
||||
uv_interp = uv_attrib;
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_UV2_INTERP)
|
||||
#if defined(ENABLE_UV2_INTERP)
|
||||
uv2_interp = uv2_attrib;
|
||||
#endif
|
||||
|
||||
|
2
modules/broken_seals_module/.gitignore
vendored
@ -5,4 +5,4 @@
|
||||
*.obj
|
||||
*.pyc
|
||||
*.bc
|
||||
*.os
|
||||
*.os
|
||||
|
@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
||||
|
@ -1,3 +1,3 @@
|
||||
# Broken Seals Module
|
||||
|
||||
C++ code for Broken Seals.
|
||||
C++ code for Broken Seals.
|
||||
|
@ -138,4 +138,4 @@ void BiomeTerrarinGenerator::_bind_methods() {
|
||||
#ifdef VOXELMAN_PRESENT
|
||||
ClassDB::bind_method(D_METHOD("generate_simple_terrarin", "chunk", "spawn_mobs"), &BiomeTerrarinGenerator::generate_simple_terrarin);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -56,4 +56,4 @@ private:
|
||||
int _current_seed;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
2
modules/entity_spell_system/.gitignore
vendored
@ -5,4 +5,4 @@
|
||||
*.obj
|
||||
*.pyc
|
||||
*.bc
|
||||
*.os
|
||||
*.os
|
||||
|
@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Entity Spell System
|
||||
|
||||
An entity and spell system for the GODOT Engine, that is usable for both 2d, and 3d games. The main purpose of this
|
||||
module is to handle spells, auras, and most entity-related things like spawning, items, inventory, containers,
|
||||
An entity and spell system for the GODOT Engine, that is usable for both 2d, and 3d games. The main purpose of this
|
||||
module is to handle spells, auras, and most entity-related things like spawning, items, inventory, containers,
|
||||
vendors, interaction, targeting, equipment (+ visuals), loot, crafting, talents, pets, npcs, etc ...
|
||||
|
||||
The module supports networking. It is designed to be authoritative, so players shouldn't be able to cheat by design.
|
||||
@ -20,7 +20,7 @@ This module is developed with the 3.x branch of godot, usually at the newest rev
|
||||
|
||||
## Project setup tl;dr
|
||||
|
||||
### First
|
||||
### First
|
||||
|
||||
You need to create an `ESSResourceDB` resource somewhere in you project. (Or alloocate it dynamically.)
|
||||
|
||||
@ -40,7 +40,7 @@ This is where you have to implement your spawning logic.
|
||||
Movement, and controls.
|
||||
|
||||
Unfortunately, there isn't a one-stop-shop solution for movement, especially if we throw networking into the mix,
|
||||
and the same is true for targeting. This means that this module cannot really do much in this regard, but it will
|
||||
and the same is true for targeting. This means that this module cannot really do much in this regard, but it will
|
||||
give you as much help to set everything up as possible.
|
||||
|
||||
## Optional Dependencies
|
||||
@ -53,7 +53,7 @@ Adds mesh (MeshDataResource) support to ModelVisuals.
|
||||
|
||||
## Pre-built binaries
|
||||
|
||||
You can grab a pre-built editor binary from the [Broken Seals](https://github.com/Relintai/broken_seals/releases)
|
||||
You can grab a pre-built editor binary from the [Broken Seals](https://github.com/Relintai/broken_seals/releases)
|
||||
repo, should you want to. It contains all my modules.
|
||||
|
||||
## Overview
|
||||
@ -65,8 +65,8 @@ Do not call methods with underscores, all of them has a normal counterpart, alwa
|
||||
For example entity has `crafts(int id)` and `_crafts(int id)` (virtual). Always use `crafts(int id)`, it will
|
||||
call `_crafts(int id)`.
|
||||
|
||||
For networked classes, every variable is broken up into clientside, and serverside. This makes it easier to
|
||||
develop games that can also run locally, with less overhead and simpler logic.
|
||||
For networked classes, every variable is broken up into clientside, and serverside. This makes it easier to
|
||||
develop games that can also run locally, with less overhead and simpler logic.
|
||||
E.g. this makes it easy to use the visibility system even when you play locally on the server, because you just use the clientside variables,
|
||||
and your logic will work the same way.
|
||||
|
||||
@ -80,7 +80,7 @@ The module contains 2 singletons. `ESS`, and `ProfileManager`. Both are accessib
|
||||
|
||||
### The ESS singleton
|
||||
|
||||
Contains the active `ESSResourceDB` instance, and for convenience a reference to the active `ESSEntitySpawner`
|
||||
Contains the active `ESSResourceDB` instance, and for convenience a reference to the active `ESSEntitySpawner`
|
||||
instance. Also loads/handles/processes all of the entity and spell system related ProjectSettings, so if you need
|
||||
any ESS related value from ProjectSettings, don't query it directly, get it from this singleton.
|
||||
|
||||
@ -125,7 +125,7 @@ Contains item-related enums, like rarity, armor type, item types.
|
||||
|
||||
### SpellEnums
|
||||
|
||||
Contains spell-related enums, like aura types, damage types, spell categories, spell types, trigger types,
|
||||
Contains spell-related enums, like aura types, damage types, spell categories, spell types, trigger types,
|
||||
and quite a few notification constants.
|
||||
|
||||
### Customizable enums
|
||||
@ -142,10 +142,10 @@ Fer example:
|
||||
If you want you game to work with the following stats: Agility,Intellect,Crit,Weapon Damage,Stamina
|
||||
and you want Agility,Intellect,Stamina as you main stats.
|
||||
|
||||
Firstly you want to put you main stats at the beginning, because the system will take the first `main_stat_count`
|
||||
Firstly you want to put you main stats at the beginning, because the system will take the first `main_stat_count`
|
||||
stats as main stats.
|
||||
|
||||
And then just enter `Agility,Intellect,Stamina,Crit,Weapon Damage` into the `stats` setting, and then
|
||||
And then just enter `Agility,Intellect,Stamina,Crit,Weapon Damage` into the `stats` setting, and then
|
||||
set `main_stat_count` to 3.
|
||||
|
||||
When these values are expected to be used as properties, the `ESS` singleton will create snake_cased versions automatically.
|
||||
@ -156,8 +156,8 @@ So in the example case `ESS.stat_get_property_name(4)` would return `weapon_dama
|
||||
## ESSResourceDB
|
||||
|
||||
This is a class that maps ids to resources for quick lookups.
|
||||
This is necessary in order to support networking, because you don't want to send resource paths over the network
|
||||
every time somebody casts a spell for example.
|
||||
This is necessary in order to support networking, because you don't want to send resource paths over the network
|
||||
every time somebody casts a spell for example.
|
||||
|
||||
### ESSResourceDBStatic
|
||||
|
||||
@ -185,7 +185,7 @@ It will load everything from the folders that you set up into it's `folders` pro
|
||||
|
||||
## Entity
|
||||
|
||||
This is the main class that can be used for players/mobs/npcs and also other things like chests.
|
||||
This is the main class that can be used for players/mobs/npcs and also other things like chests.
|
||||
|
||||
I ended up merging subclass functionality into it, because
|
||||
that way it gains a lot more utility, by sacrificing only a small amount of memory.
|
||||
@ -193,8 +193,8 @@ For example this way it is easy to make chests attack the player, or make spell
|
||||
|
||||
## Entity Body
|
||||
|
||||
Originally entities used to be inherited from `Spatial` or `Node2D`, so they could contain/drive their own models,
|
||||
but eventually on order to support both 2d, and 3d, bodies were separated from them. This unfortunately
|
||||
Originally entities used to be inherited from `Spatial` or `Node2D`, so they could contain/drive their own models,
|
||||
but eventually on order to support both 2d, and 3d, bodies were separated from them. This unfortunately
|
||||
complicates the setup a bit, but the upsides overweight the downsides, as this way you don't need to create different
|
||||
entities for every model/body you have.
|
||||
|
||||
@ -205,7 +205,7 @@ you can call `void instance_body(entity_data: EntityData, model_index: int)` on
|
||||
|
||||
The `model_index` property tell the `Entity` which one it should use.
|
||||
|
||||
Instancing bodies does not happen immediately, but you will probably want to set an `Entity`'s position right where
|
||||
Instancing bodies does not happen immediately, but you will probably want to set an `Entity`'s position right where
|
||||
you create it, a few helpers were added:\
|
||||
|
||||
`void set_transform_2d(transform: Transform2D, only_stored: bool = false)`\
|
||||
@ -258,7 +258,7 @@ It has 2 modes, `Bone` and `Attachment`.
|
||||
|
||||
In the bone mode, you need to select an entity type, and then a concrete bone. This is the "merge this into the final character mesh" mode.
|
||||
|
||||
In the attachment mode, you need to select a common attach point (`ProjectSettings->Ess->enums->skeletons_bone_attachment_points`),
|
||||
In the attachment mode, you need to select a common attach point (`ProjectSettings->Ess->enums->skeletons_bone_attachment_points`),
|
||||
and the containing mesh will be put on to that point by the CharacterSkeleton. This is how you can implement weapons for example.
|
||||
|
||||
### EntitySpeciesData
|
||||
@ -275,10 +275,10 @@ after a change to the strings.
|
||||
|
||||
The body can be any scene, Entity will instance it, and set it to it's body property.
|
||||
|
||||
The body should handle movement based on the player's input, it should handle sending position information through the network,
|
||||
The body should handle movement based on the player's input, it should handle sending position information through the network,
|
||||
if you want networking, it might (`CharacterSkeleton`s can also do it) also drive your animations/animation players if you have it.
|
||||
|
||||
Bodies does not need to handle the graphics themselves (`ModelVisualEntries` for example) (you can implement your logic here
|
||||
Bodies does not need to handle the graphics themselves (`ModelVisualEntries` for example) (you can implement your logic here
|
||||
if you want to), but the `CharacterSkeleton` classes exist for that purpose.
|
||||
|
||||
[Complex 3d body script](https://github.com/Relintai/broken_seals/blob/master/game/player/Body.gd) \
|
||||
@ -325,7 +325,7 @@ In order to spawn an entity you need it.
|
||||
|
||||
#### EntityClassData
|
||||
|
||||
`EntityClassData` holds class-related information, like specs (`CharacterSpec`), spells, start spells, start auras,
|
||||
`EntityClassData` holds class-related information, like specs (`CharacterSpec`), spells, start spells, start auras,
|
||||
alternative ais, `EntityResource`s (mana for example).
|
||||
|
||||
#### CharacterSpec
|
||||
@ -339,10 +339,10 @@ EntityResources are things like mana, health, or speed. These add greater flexib
|
||||
The resource system is quite flexible, if you add a resource serverside, it will be automatically
|
||||
added clientside. (You have to add `EntityResource`s to the active `ESSResourceDB`!)
|
||||
|
||||
By default all entities have the build in speed and health resources, as a set index
|
||||
By default all entities have the build in speed and health resources, as a set index
|
||||
(`EntityEnums::ENTITY_RESOURCE_INDEX_HEALTH` and `EntityEnums::ENTITY_RESOURCE_INDEX_SPEED`).
|
||||
|
||||
There is also the `EntityEnums::ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN` constant, so you have
|
||||
There is also the `EntityEnums::ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN` constant, so you have
|
||||
the current offset where the custom resources start.
|
||||
|
||||
Entity allocates these in it's `_initialize()` virtual method, if you want to customize them.
|
||||
@ -379,7 +379,7 @@ If you want your player to interact with it's target. For example a vendor, or l
|
||||
First make sure that you can interact, by checking `Entity.cans_interact()` or `Entity.canc_interact()`.
|
||||
If this returns true, you can call `Entity.crequest_interact()`. This will call `Entity.sinteract()` serverside.
|
||||
|
||||
Interactions are handled by `EntityData` by default. It has the same methods. If `EntityData` is not set, the `Entity`
|
||||
Interactions are handled by `EntityData` by default. It has the same methods. If `EntityData` is not set, the `Entity`
|
||||
will try to call the same overridable on itself.
|
||||
|
||||
You can see an example implementation [here](https://github.com/Relintai/broken_seals/blob/master/game/scripts/entities/EntityDataGD.gd).
|
||||
@ -392,7 +392,7 @@ When an `Entity` gets spawned it will create a copy for itself, so you can safel
|
||||
|
||||
#### AIFormation
|
||||
|
||||
Not yet finished, it was meant as a way to calculate offset pet positions, (If an `Entity` has let's say
|
||||
Not yet finished, it was meant as a way to calculate offset pet positions, (If an `Entity` has let's say
|
||||
4 pets you don't just want them all to stay on top of their controller).
|
||||
|
||||
If this functionality ends up in `EntityAI`, after pets are finished, this will be removed.
|
||||
@ -415,7 +415,7 @@ Also Entities have a target bag property. For example this makes vendors easily
|
||||
### VRPCs
|
||||
|
||||
Entities has a networked visibility system. The method itself is called `vrpc`, it works the same way as normal rpcs.
|
||||
If you want to send data to every client that sees the current entity, use this.
|
||||
If you want to send data to every client that sees the current entity, use this.
|
||||
|
||||
## Spells, Auras, Talents
|
||||
|
||||
@ -433,7 +433,7 @@ Request to learn a spell clientside: `void spell_learn_requestc(id: int)`
|
||||
|
||||
Request talent learning clientside: \
|
||||
`void character_talent_crequest_learn(spec_index: int, character_talent_row: int, character_talent_culomn: int)` or \
|
||||
`void class_talent_crequest_learn(spec_index: int, class_talent_row: int, class_talent_culomn: int)`
|
||||
`void class_talent_crequest_learn(spec_index: int, class_talent_row: int, class_talent_culomn: int)`
|
||||
|
||||
#### Cast a spell
|
||||
|
||||
@ -469,7 +469,7 @@ export(Spell) var aura : Spell
|
||||
|
||||
func sapply_aura() -> void:
|
||||
var ainfo : AuraApplyInfo = AuraApplyInfo.new()
|
||||
|
||||
|
||||
ainfo.caster = info.caster
|
||||
ainfo.target = info.caster
|
||||
ainfo.spell_scale = 1
|
||||
@ -515,14 +515,14 @@ Helps to apply auras
|
||||
|
||||
#### SpellDamageInfo, SpellHealInfo
|
||||
|
||||
These are used in the damage and heal calculation. For example these can be used to implement immunities, or absorb effects
|
||||
These are used in the damage and heal calculation. For example these can be used to implement immunities, or absorb effects
|
||||
by modifying their damage values in aura callbacks.
|
||||
|
||||
### Projectiles
|
||||
|
||||
Spells support projectiles, they are created/set up inside `void handle_projectile(info: SpellCastInfo)`.
|
||||
|
||||
The default implementation will instance `Spell`'s projectile scene (if set), and then it will try to call a
|
||||
The default implementation will instance `Spell`'s projectile scene (if set), and then it will try to call a
|
||||
`void setup_projectile(info: SpellCastInfo)` on it if exists.
|
||||
|
||||
You can override this behaviour by implementing your own `_void handle_projectile(info: SpellCastInfo)` on `Spell`
|
||||
@ -554,7 +554,7 @@ Now you can start distributing xp, for whatever you'd like to Entities, using `E
|
||||
|
||||
## Examples
|
||||
|
||||
Eventually I'll create a separate repository with a few examples/demos, but for now you can check the game
|
||||
Eventually I'll create a separate repository with a few examples/demos, but for now you can check the game
|
||||
I've been working on for examples.
|
||||
|
||||
3d:
|
||||
@ -563,7 +563,7 @@ https://github.com/Relintai/broken_seals.git
|
||||
2d turn based:
|
||||
https://github.com/Relintai/broken_seals_roguelike
|
||||
|
||||
2d:
|
||||
2d:
|
||||
https://github.com/Relintai/broken_seals_2d.git
|
||||
|
||||
## Compiling
|
||||
|
@ -59,7 +59,7 @@ sources = [
|
||||
"entities/skills/entity_skill_data.cpp",
|
||||
|
||||
"entities/data/character_spec.cpp",
|
||||
|
||||
|
||||
"skeleton/character_bones.cpp",
|
||||
|
||||
"entities/stats/stat_data.cpp",
|
||||
|
@ -93,4 +93,4 @@ typedef class RenderingServer VS;
|
||||
#define DISCONNECT(sig, obj, target_method_class, method) disconnect(sig, obj, #method)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -5,7 +5,7 @@
|
||||
</brief_description>
|
||||
<description>
|
||||
Gives easy access to entity and spell related data, providing easy lookups.
|
||||
Make sure that you add everything both server and clientside before use, because the system uses ids (get_id()) for server clinet communications. This also means that ids should be unique per resources for every ESS-related resources.
|
||||
Make sure that you add everything both server and clientside before use, because the system uses ids (get_id()) for server clinet communications. This also means that ids should be unique per resources for every ESS-related resources.
|
||||
For example you shouldn't register 2 spells with id 1 (you will get an error), but you can register a [Spell] with id1 and an [Aura] with an id 1.
|
||||
Also grants access easy to ESS-related project settings.
|
||||
</description>
|
||||
|
@ -1404,7 +1404,7 @@ void Entity::_from_dict(const Dictionary &dict) {
|
||||
//EntityPlayerType not needed
|
||||
sets_immunity_flags(dict.get("immunity_flags", 0));
|
||||
sets_entity_flags(dict.get("entity_flags", 0));
|
||||
|
||||
|
||||
//EntityEnums::EntityController contr = static_cast<EntityEnums::EntityController>(static_cast<int>(dict.get("entity_controller", 0)));
|
||||
|
||||
//sets_original_entity_controller(contr);
|
||||
@ -6371,36 +6371,36 @@ void Entity::_notification_sdeath() {
|
||||
/*
|
||||
if dead:
|
||||
return
|
||||
|
||||
|
||||
if starget == null:
|
||||
queue_free()
|
||||
return
|
||||
|
||||
|
||||
#warning-ignore:unused_variable
|
||||
for i in range(aura_gets_count()):
|
||||
aura_removes(aura_gets(0))
|
||||
|
||||
|
||||
dead = true
|
||||
|
||||
|
||||
var ldiff : float = slevel - starget.slevel + 10.0
|
||||
|
||||
|
||||
if ldiff < 0:
|
||||
ldiff = 0
|
||||
|
||||
|
||||
if ldiff > 15:
|
||||
ldiff = 15
|
||||
|
||||
|
||||
ldiff /= 10.0
|
||||
|
||||
|
||||
starget.xp_adds(int(5.0 * slevel * ldiff))
|
||||
|
||||
|
||||
starget = null
|
||||
|
||||
|
||||
sentity_interaction_type = EntityEnums.ENITIY_INTERACTION_TYPE_LOOT
|
||||
ai_state = EntityEnums.AI_STATE_OFF
|
||||
|
||||
|
||||
anim_node_state_machine.travel("dead")
|
||||
|
||||
|
||||
# set_process(false)
|
||||
set_physics_process(false)
|
||||
*/
|
||||
|
@ -120,4 +120,4 @@ void InputProfile::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("load_to_projectsettings"), &InputProfile::load_to_projectsettings);
|
||||
ClassDB::bind_method(D_METHOD("save_from_projectsettings"), &InputProfile::save_from_projectsettings);
|
||||
}
|
||||
}
|
||||
|
@ -55,4 +55,4 @@ void PropDataEntity::_bind_methods() {
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "level"), "set_level", "get_level");
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
2
modules/fastnoise/.gitignore
vendored
@ -5,4 +5,4 @@
|
||||
*.obj
|
||||
*.pyc
|
||||
*.bc
|
||||
*.os
|
||||
*.os
|
||||
|
@ -11,7 +11,7 @@ def get_doc_path():
|
||||
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
|
||||
|
||||
|
||||
def configure(env):
|
||||
pass
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#if VERSION_MAJOR >= 4
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
@ -481,9 +481,9 @@ FN_DECIMAL FastNoise::GetNoise(FN_DECIMAL x, FN_DECIMAL y) const
|
||||
{
|
||||
case FBM:
|
||||
return SingleCubicFractalFBM(x, y);
|
||||
case Billow:
|
||||
case Billow:
|
||||
return SingleCubicFractalBillow(x, y);
|
||||
case RigidMulti:
|
||||
case RigidMulti:
|
||||
return SingleCubicFractalRigidMulti(x, y);
|
||||
}
|
||||
}
|
||||
@ -1462,9 +1462,9 @@ FN_DECIMAL FastNoise::GetCubicFractal(FN_DECIMAL x, FN_DECIMAL y, FN_DECIMAL z)
|
||||
{
|
||||
case FBM:
|
||||
return SingleCubicFractalFBM(x, y, z);
|
||||
case Billow:
|
||||
case Billow:
|
||||
return SingleCubicFractalBillow(x, y, z);
|
||||
case RigidMulti:
|
||||
case RigidMulti:
|
||||
return SingleCubicFractalRigidMulti(x, y, z);
|
||||
default:
|
||||
return 0;
|
||||
@ -1593,9 +1593,9 @@ FN_DECIMAL FastNoise::GetCubicFractal(FN_DECIMAL x, FN_DECIMAL y) const
|
||||
{
|
||||
case FBM:
|
||||
return SingleCubicFractalFBM(x, y);
|
||||
case Billow:
|
||||
case Billow:
|
||||
return SingleCubicFractalBillow(x, y);
|
||||
case RigidMulti:
|
||||
case RigidMulti:
|
||||
return SingleCubicFractalRigidMulti(x, y);
|
||||
default:
|
||||
return 0;
|
||||
@ -1846,7 +1846,7 @@ FN_DECIMAL FastNoise::SingleCellular2Edge(FN_DECIMAL x, FN_DECIMAL y, FN_DECIMAL
|
||||
|
||||
for (int i = m_cellularDistanceIndex1; i > 0; i--)
|
||||
distance[i] = fmax(fmin(distance[i], newDistance), distance[i - 1]);
|
||||
distance[0] = fmin(distance[0], newDistance);
|
||||
distance[0] = fmin(distance[0], newDistance);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1952,7 +1952,7 @@ FN_DECIMAL FastNoise::SingleCellular(FN_DECIMAL x, FN_DECIMAL y) const
|
||||
|
||||
FN_DECIMAL vecX = xi - x + CELL_2D_X[lutPos] * m_cellularJitter;
|
||||
FN_DECIMAL vecY = yi - y + CELL_2D_Y[lutPos] * m_cellularJitter;
|
||||
|
||||
|
||||
FN_DECIMAL newDistance = vecX * vecX + vecY * vecY;
|
||||
|
||||
if (newDistance < distance)
|
||||
@ -2274,4 +2274,4 @@ void FastNoise::SingleGradientPerturb(unsigned char offset, FN_DECIMAL warpAmp,
|
||||
#if VERSION_MAJOR >= 4
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#endif
|
||||
|
@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
||||
|
@ -37,7 +37,7 @@ const String FastNoise::BINDING_STRING_CELLULAR_DISTANCE_FUNCTION = "Euclidean,M
|
||||
const String FastNoise::BINDING_STRING_CELLULAR_RETURN_TYPE = "Cell Value,Noise lookup,Distance,Distance 2,Distance 2 Add,Distance 2 Sub,Distance 2 Mul,Distance 2 Div";
|
||||
|
||||
FastNoise::FastNoise() : Reference() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
void FastNoise::set_cellular_noise_lookup(Ref<FastNoise> other_noise) {
|
||||
@ -64,7 +64,7 @@ PoolIntArray FastNoise::get_cellular_distance_2_indices() const {
|
||||
}
|
||||
|
||||
void FastNoise::_bind_methods() {
|
||||
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_seed", "seed"), &FastNoise::set_seed);
|
||||
ClassDB::bind_method(D_METHOD("get_seed"), &FastNoise::get_seed);
|
||||
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
RETURN_DISTANCE_2_MUL = _FastNoise::Distance2Mul,
|
||||
RETURN_DISTANCE_2_DIV = _FastNoise::Distance2Div
|
||||
};
|
||||
|
||||
|
||||
FastNoise();
|
||||
|
||||
// Methods (Godot-style mappings to FastNoise)
|
||||
|
2
modules/mesh_data_resource/.gitignore
vendored
@ -4,4 +4,4 @@
|
||||
*.meta
|
||||
*.obj
|
||||
*.pyc
|
||||
*.bc
|
||||
*.bc
|
||||
|
@ -11,7 +11,7 @@ The module also comes with importers (gltf, and collada for now), you can import
|
||||
|
||||
## Pre-built binaries
|
||||
|
||||
You can grab a pre-built editor binary from the [Broken Seals](https://github.com/Relintai/broken_seals/releases)
|
||||
You can grab a pre-built editor binary from the [Broken Seals](https://github.com/Relintai/broken_seals/releases)
|
||||
repo, should you want to. It contains all my modules.
|
||||
|
||||
## MeshDataResource
|
||||
@ -24,7 +24,7 @@ Holds a list of MeshDataResources.
|
||||
|
||||
## MeshDataInstance
|
||||
|
||||
You can easily put MeshDataResources into the scene with these. They are equivalent to MeshInstances, except they work
|
||||
You can easily put MeshDataResources into the scene with these. They are equivalent to MeshInstances, except they work
|
||||
with MeshDataResources.
|
||||
|
||||
## Importers
|
||||
|
@ -34,4 +34,4 @@ if os.path.isdir('../props'):
|
||||
module_env.add_source_files(env.modules_sources,"props/prop_data_mesh_data.cpp")
|
||||
|
||||
if os.path.isdir('../props_2d'):
|
||||
module_env.add_source_files(env.modules_sources,"props_2d/prop_2d_data_mesh_data.cpp")
|
||||
module_env.add_source_files(env.modules_sources,"props_2d/prop_2d_data_mesh_data.cpp")
|
||||
|
@ -127,4 +127,4 @@ void PropDataMeshData::_bind_methods() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -134,4 +134,4 @@ void Prop2DDataMeshData::_bind_methods() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
2
modules/mesh_utils/.gitignore
vendored
@ -5,4 +5,4 @@
|
||||
*.obj
|
||||
*.pyc
|
||||
*.bc
|
||||
*.os
|
||||
*.os
|
||||
|
@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
||||
|
@ -2,17 +2,17 @@
|
||||
|
||||
This is a c++ engine module for the Godot engine, containing my mesh merging utilities.
|
||||
|
||||
It supports both godot 3.2 and 4.0 (master [last tested commit](https://github.com/godotengine/godot/commit/b7e10141197fdd9b0dbc4cfa7890329510d36540)). Note that since 4.0 is still in very early stages I only
|
||||
It supports both godot 3.2 and 4.0 (master [last tested commit](https://github.com/godotengine/godot/commit/b7e10141197fdd9b0dbc4cfa7890329510d36540)). Note that since 4.0 is still in very early stages I only
|
||||
check whether it works from time to time.
|
||||
|
||||
# Pre-built binaries
|
||||
|
||||
You can grab a pre-built editor binary from the [Broken Seals](https://github.com/Relintai/broken_seals/releases)
|
||||
You can grab a pre-built editor binary from the [Broken Seals](https://github.com/Relintai/broken_seals/releases)
|
||||
repo, should you want to. It contains all my modules.
|
||||
|
||||
# Optional Dependencies
|
||||
|
||||
[Mesh Data Resource](https://github.com/Relintai/mesh_data_resource): Support for merged meshes, even in gles2.
|
||||
[Mesh Data Resource](https://github.com/Relintai/mesh_data_resource): Support for merged meshes, even in gles2.
|
||||
Adds MeshMerger a few helper methods.
|
||||
|
||||
# MeshUtils Singleton
|
||||
|
@ -117,4 +117,4 @@ typedef class RenderingServer VS;
|
||||
#define GET_WORLD get_world
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -641,4 +641,4 @@ void MeshUtils::_bind_methods() {
|
||||
|
||||
#if GODOT4
|
||||
#undef Texture
|
||||
#endif
|
||||
#endif
|
||||
|
@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
||||
|
@ -500,7 +500,7 @@ static float square(float f) {
|
||||
/** Return the next power of two.
|
||||
* @see http://graphics.stanford.edu/~seander/bithacks.html
|
||||
* @warning Behaviour for 0 is undefined.
|
||||
* @note isPowerOfTwo(x) == true -> nextPowerOfTwo(x) == x
|
||||
* @note isPowerOfTwo(x) -> nextPowerOfTwo(x) == x
|
||||
* @note nextPowerOfTwo(x) = 2 << log2(x-1)
|
||||
*/
|
||||
static uint32_t nextPowerOfTwo(uint32_t x) {
|
||||
|
2
modules/props/.gitignore
vendored
@ -5,4 +5,4 @@
|
||||
*.obj
|
||||
*.pyc
|
||||
*.bc
|
||||
*.os
|
||||
*.os
|
||||
|
@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
||||
|
@ -4,12 +4,12 @@ This is a c++ engine module for the Godot Engine.
|
||||
|
||||
It gives you props, and editor utilities to convert scenes to props.
|
||||
|
||||
It supports both godot 3.2 and 4.0 (master [last tested commit](https://github.com/godotengine/godot/commit/b7e10141197fdd9b0dbc4cfa7890329510d36540)). Note that since 4.0 is still in very early stages I only
|
||||
It supports both godot 3.2 and 4.0 (master [last tested commit](https://github.com/godotengine/godot/commit/b7e10141197fdd9b0dbc4cfa7890329510d36540)). Note that since 4.0 is still in very early stages I only
|
||||
check whether it works from time to time.
|
||||
|
||||
# Pre-built binaries
|
||||
|
||||
You can grab a pre-built editor binary from the [Broken Seals](https://github.com/Relintai/broken_seals/releases)
|
||||
You can grab a pre-built editor binary from the [Broken Seals](https://github.com/Relintai/broken_seals/releases)
|
||||
repo, should you want to. It contains all my modules.
|
||||
|
||||
# Optional Dependencies
|
||||
@ -22,7 +22,7 @@ repo, should you want to. It contains all my modules.
|
||||
|
||||
Props are basicly 3D scenes in a simple format, so other things can easily process them without instancing.
|
||||
|
||||
For example if you create a building from MeshDataInstances, and then convert that scene to a prop, Voxelman
|
||||
For example if you create a building from MeshDataInstances, and then convert that scene to a prop, Voxelman
|
||||
can spawn it, merge it's meshes, and create lods without any scene instancing.
|
||||
|
||||
PropData is the main class you'll use, it's main purpose it to store a list of PropDataEntries.
|
||||
@ -65,7 +65,7 @@ You can register new PropDataEntries as processors, should you need to.
|
||||
|
||||
# Scene conversion
|
||||
|
||||
You can either click the new "To Prop" button on the menubar of the 3D scene for a quick conversion,
|
||||
You can either click the new "To Prop" button on the menubar of the 3D scene for a quick conversion,
|
||||
or look into Project->Tools.
|
||||
|
||||
# Building
|
||||
|
@ -17,7 +17,7 @@ def get_doc_classes():
|
||||
"PropDataPortal",
|
||||
"PropDataTiledWall",
|
||||
"PropData",
|
||||
|
||||
|
||||
"TiledWall",
|
||||
"TiledWallData",
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Doc classes will appear here when generating
|
||||
Doc classes will appear here when generating
|
||||
|
@ -171,4 +171,4 @@ void PropTextureJob::execute() {
|
||||
call("_execute");
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -279,4 +279,4 @@ void PropInstanceJob::execute() {
|
||||
call("_execute");
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -29,7 +29,7 @@ SOFTWARE.
|
||||
#include "core/io/resource.h"
|
||||
#include "core/math/transform_3d.h"
|
||||
|
||||
#ifndef Transform
|
||||
#ifndef Transform
|
||||
#define Transform Transform3D
|
||||
#endif
|
||||
#else
|
||||
@ -61,7 +61,7 @@ public:
|
||||
virtual void _processor_process(Ref<PropData> prop_data, Node *node, const Transform &transform);
|
||||
virtual Node *_processor_get_node_for(const Transform &transform);
|
||||
virtual bool _processor_evaluate_children();
|
||||
|
||||
|
||||
PropDataEntry();
|
||||
~PropDataEntry();
|
||||
|
||||
|
2
modules/props_2d/.gitignore
vendored
@ -5,4 +5,4 @@
|
||||
*.obj
|
||||
*.pyc
|
||||
*.bc
|
||||
*.os
|
||||
*.os
|
||||
|
@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
||||
|
@ -4,12 +4,12 @@ This is a c++ engine module for the Godot Engine.
|
||||
|
||||
It gives you props, and editor utilities to convert scenes to props.
|
||||
|
||||
It supports both godot 3.2 and 4.0 (master [last tested commit](https://github.com/godotengine/godot/commit/b7e10141197fdd9b0dbc4cfa7890329510d36540)). Note that since 4.0 is still in very early stages I only
|
||||
It supports both godot 3.2 and 4.0 (master [last tested commit](https://github.com/godotengine/godot/commit/b7e10141197fdd9b0dbc4cfa7890329510d36540)). Note that since 4.0 is still in very early stages I only
|
||||
check whether it works from time to time.
|
||||
|
||||
# Pre-built binaries
|
||||
|
||||
You can grab a pre-built editor binary from the [Broken Seals](https://github.com/Relintai/broken_seals/releases)
|
||||
You can grab a pre-built editor binary from the [Broken Seals](https://github.com/Relintai/broken_seals/releases)
|
||||
repo, should you want to. It contains all my modules.
|
||||
|
||||
# Optional Dependencies
|
||||
@ -22,7 +22,7 @@ repo, should you want to. It contains all my modules.
|
||||
|
||||
Prop2Ds are basicly 3D scenes in a simple format, so other things can easily process them without instancing.
|
||||
|
||||
For example if you create a building from MeshDataInstances, and then convert that scene to a prop, Voxelman
|
||||
For example if you create a building from MeshDataInstances, and then convert that scene to a prop, Voxelman
|
||||
can spawn it, merge it's meshes, and create lods without any scene instancing.
|
||||
|
||||
Prop2DData is the main class you'll use, it's main purpose it to store a list of Prop2DDataEntries.
|
||||
@ -65,7 +65,7 @@ You can register new Prop2DDataEntries as processors, should you need to.
|
||||
|
||||
# Scene conversion
|
||||
|
||||
You can either click the new "To Prop2D" button on the menubar of the 3D scene for a quick conversion,
|
||||
You can either click the new "To Prop2D" button on the menubar of the 3D scene for a quick conversion,
|
||||
or look into Project->Tools.
|
||||
|
||||
# Building
|
||||
|
@ -61,7 +61,7 @@ sources = [
|
||||
"prop_2d_mesher.cpp",
|
||||
|
||||
"jobs/prop_2d_texture_job.cpp",
|
||||
|
||||
|
||||
"material_cache/prop_2d_material_cache.cpp"
|
||||
]
|
||||
|
||||
|
@ -17,7 +17,7 @@ def get_doc_classes():
|
||||
"Prop2DDataPortal",
|
||||
"Prop2DDataTiledWall2D",
|
||||
"Prop2DData",
|
||||
|
||||
|
||||
"TiledWall2D",
|
||||
"TiledWall2DData",
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Doc classes will appear here when generating
|
||||
Doc classes will appear here when generating
|
||||
|
@ -171,4 +171,4 @@ void Prop2DTextureJob::execute() {
|
||||
call("_execute");
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -279,4 +279,4 @@ void Prop2DInstanceJob::execute() {
|
||||
call("_execute");
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -789,7 +789,7 @@ Rect2 Prop2DMesher::calculate_rect() {
|
||||
|
||||
if (size == 0) {
|
||||
return Rect2();
|
||||
}
|
||||
}
|
||||
|
||||
Rect2 rect;
|
||||
|
||||
|
@ -63,6 +63,6 @@ void Prop2DSceneInstance::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_scene"), &Prop2DSceneInstance::get_scene);
|
||||
ClassDB::bind_method(D_METHOD("set_scene", "value"), &Prop2DSceneInstance::set_scene);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "scene", PROPERTY_HINT_RESOURCE_TYPE, "PackedScene"), "set_scene", "get_scene");
|
||||
|
||||
|
||||
ClassDB::bind_method(D_METHOD("build"), &Prop2DSceneInstance::build);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ void Prop2DDataScene::_processor_process(Ref<Prop2DData> prop_data, Node *node,
|
||||
}
|
||||
|
||||
l->set_scene(i->get_scene());
|
||||
|
||||
|
||||
Prop2DDataEntry::_processor_process(prop_data, node, transform, l);
|
||||
}
|
||||
|
||||
|
@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
||||
|
@ -7,4 +7,4 @@ env.add_source_files(env.modules_sources,"tile_set.cpp")
|
||||
if env["tools"]:
|
||||
env.add_source_files(env.modules_sources, "tile_map_editor_plugin.cpp")
|
||||
env.add_source_files(env.modules_sources, "tile_set_editor_plugin.cpp")
|
||||
|
||||
|
||||
|
@ -10,4 +10,4 @@ def get_doc_classes():
|
||||
]
|
||||
|
||||
def get_doc_path():
|
||||
return "doc_classes"
|
||||
return "doc_classes"
|
||||
|
@ -3,7 +3,7 @@
|
||||
This is a c++ engine module for the Godot engine that contains a modularized version of TokageItLab's pr's 3.2 version from the godot engine repository, until it gets merged.
|
||||
|
||||
The original pr is here: https://github.com/godotengine/godot/pull/45699
|
||||
Tht 3.x version (linked in the pr itself) is here (This is the base for this module): https://github.com/TokageItLab/godot/tree/pose-edit-mode
|
||||
Tht 3.x version (linked in the pr itself) is here (This is the base for this module): https://github.com/TokageItLab/godot/tree/pose-edit-mode
|
||||
|
||||
I'm developing this for godot 3.x, it will probably work on earlier versions though. 4.0 is not supported.
|
||||
|
||||
|
@ -6,4 +6,4 @@ if env["tools"]:
|
||||
env.add_source_files(env.modules_sources, "skeleton_editor_plugin.cpp")
|
||||
env.add_source_files(env.modules_sources, "spatial_editor_gizmos.cpp")
|
||||
env.add_source_files(env.modules_sources, "skeleton_editor_module_plugin.cpp")
|
||||
|
||||
|
||||
|
@ -10,4 +10,4 @@ def get_doc_classes():
|
||||
]
|
||||
|
||||
def get_doc_path():
|
||||
return "doc_classes"
|
||||
return "doc_classes"
|
||||
|
@ -1 +1 @@
|
||||
<svg height="8" viewBox="0 0 8 8" width="8" xmlns="http://www.w3.org/2000/svg"><circle cx="4" cy="4" fill="#fff" r="4"/><circle cx="4" cy="4" fill="#000" r="2.5"/></svg>
|
||||
<svg height="8" viewBox="0 0 8 8" width="8" xmlns="http://www.w3.org/2000/svg"><circle cx="4" cy="4" fill="#fff" r="4"/><circle cx="4" cy="4" fill="#000" r="2.5"/></svg>
|
||||
|
Before Width: | Height: | Size: 169 B After Width: | Height: | Size: 170 B |
@ -1 +1 @@
|
||||
<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".9961"><path d="m11.5 14.448-.831-.831-.909.909 1.286 1.285c.251.251.657.251.908 0l1.286-1.285-.909-.909z"/><circle cx="11.5" cy="11.5" r="1.286"/><path d="m8.753 10.038-.278-.278-1.286 1.286c-.251.251-.251.657 0 .908l.824.824.462.462.909-.909-.832-.831.832-.831z"/><path d="m15.812 11.046-1.286-1.286-.909.909.831.831-.831.831.909.909 1.285-1.286c.252-.251.252-.657.001-.908z"/><path d="m11.954 7.188c-.061-.061-.133-.107-.21-.139-.028-.012-.059-.01-.088-.018-.051-.013-.1-.03-.151-.03-.005 0-.01 0-.015 0-.167.002-.327.069-.444.187l-1.286 1.287.278.278.631.63.831-.831.831.831.909-.908-.465-.465z"/><path d="m6.128 9.985 1.286-1.286c.241-.242.545-.384.859-.426.044-.323.193-.626.426-.859l1.286-1.286c.396-.397.925-.619 1.47-.625h.05c.562 0 1.112.228 1.51.626l1.215 1.215c.016-.015.033-.025.048-.04.964-.963.964-2.524 0-3.488-.378-.378-.868-.623-1.397-.698-.074-.529-.318-1.019-.695-1.397-.455-.453-1.067-.711-1.707-.721-.667-.01-1.309.25-1.782.72-.828.829-.96 2.126-.314 3.105l-3.558 3.561c-.978-.646-2.274-.515-3.103.312-.963.962-.963 2.524 0 3.487.378.377.868.621 1.396.695.075.529.319 1.02.696 1.396.963.964 2.525.964 3.488 0 .015-.015.025-.032.04-.048l-1.215-1.215c-.835-.833-.835-2.193.001-3.028z"/></g></svg>
|
||||
<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".9961"><path d="m11.5 14.448-.831-.831-.909.909 1.286 1.285c.251.251.657.251.908 0l1.286-1.285-.909-.909z"/><circle cx="11.5" cy="11.5" r="1.286"/><path d="m8.753 10.038-.278-.278-1.286 1.286c-.251.251-.251.657 0 .908l.824.824.462.462.909-.909-.832-.831.832-.831z"/><path d="m15.812 11.046-1.286-1.286-.909.909.831.831-.831.831.909.909 1.285-1.286c.252-.251.252-.657.001-.908z"/><path d="m11.954 7.188c-.061-.061-.133-.107-.21-.139-.028-.012-.059-.01-.088-.018-.051-.013-.1-.03-.151-.03-.005 0-.01 0-.015 0-.167.002-.327.069-.444.187l-1.286 1.287.278.278.631.63.831-.831.831.831.909-.908-.465-.465z"/><path d="m6.128 9.985 1.286-1.286c.241-.242.545-.384.859-.426.044-.323.193-.626.426-.859l1.286-1.286c.396-.397.925-.619 1.47-.625h.05c.562 0 1.112.228 1.51.626l1.215 1.215c.016-.015.033-.025.048-.04.964-.963.964-2.524 0-3.488-.378-.378-.868-.623-1.397-.698-.074-.529-.318-1.019-.695-1.397-.455-.453-1.067-.711-1.707-.721-.667-.01-1.309.25-1.782.72-.828.829-.96 2.126-.314 3.105l-3.558 3.561c-.978-.646-2.274-.515-3.103.312-.963.962-.963 2.524 0 3.487.378.377.868.621 1.396.695.075.529.319 1.02.696 1.396.963.964 2.525.964 3.488 0 .015-.015.025-.032.04-.048l-1.215-1.215c-.835-.833-.835-2.193.001-3.028z"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@ -1 +1 @@
|
||||
<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m16 8c0 1.409-.72 2.641-1.824 3.345l1.824 1.823v2.832h-2.832l-4-4h-5.168v4h-4v-16h12c2.208 0 4 1.792 4 4zm-12 0h8v-4h-8z" fill="#e0e0e0"/></svg>
|
||||
<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m16 8c0 1.409-.72 2.641-1.824 3.345l1.824 1.823v2.832h-2.832l-4-4h-5.168v4h-4v-16h12c2.208 0 4 1.792 4 4zm-12 0h8v-4h-8z" fill="#e0e0e0"/></svg>
|
||||
|
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 237 B |
@ -1 +1 @@
|
||||
<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".9961"><circle cx="11.501" cy="11.5" r="1.286"/><path d="m15.536 9.51c-.568-1.152-1.591-1.985-2.79-2.331-.027-.008-.056-.011-.084-.019-.163-.043-.327-.084-.496-.109-.199-.03-.402-.048-.608-.05-.027 0-.054 0-.081 0-.039 0-.077 0-.115.001-.149.004-.299.017-.448.037-1.911.251-3.45 1.693-3.826 3.584-.049.248-.069.497-.076.745-.002.062-.002.123-.001.185.004.496.092.983.256 1.447.019.054.04.106.061.16.091.228.194.45.321.661.001.001.001.003.002.004.194.321.429.62.704.889h-.71v1.286h2.571c.355 0 .643-.287.643-.643 0-.053-.006-.105-.019-.156l-.643-2.571-1.248.313.181.721c-.54-.591-.841-1.362-.843-2.163 0-.442.09-.863.251-1.246.08-.189.178-.369.291-.537.001-.005.003-.009.005-.013.348-.516.841-.924 1.42-1.168.384-.162.805-.251 1.247-.251 1.775 0 3.214 1.439 3.214 3.214-.001.853-.34 1.669-.942 2.271l.91.91c1.363-1.363 1.706-3.442.853-5.171z"/><path d="m5.616 10.33c.502-2.522 2.553-4.443 5.103-4.778.199-.026.399-.043.598-.049l.16-.002h.1c1.182.015 2.294.375 3.236 1 .369-.894.191-1.959-.535-2.686-.378-.377-.868-.622-1.397-.697-.074-.529-.318-1.019-.695-1.397-.455-.453-1.067-.711-1.707-.721-.667-.01-1.309.25-1.782.72-.828.829-.96 2.126-.314 3.105l-3.558 3.561c-.978-.646-2.274-.515-3.103.312-.963.962-.963 2.524 0 3.487.378.377.868.621 1.396.695.075.529.319 1.02.696 1.396.632.633 1.52.842 2.329.645v-.208c0-.14.019-.275.055-.403-.639-1.202-.856-2.601-.582-3.98z"/></g></svg>
|
||||
<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".9961"><circle cx="11.501" cy="11.5" r="1.286"/><path d="m15.536 9.51c-.568-1.152-1.591-1.985-2.79-2.331-.027-.008-.056-.011-.084-.019-.163-.043-.327-.084-.496-.109-.199-.03-.402-.048-.608-.05-.027 0-.054 0-.081 0-.039 0-.077 0-.115.001-.149.004-.299.017-.448.037-1.911.251-3.45 1.693-3.826 3.584-.049.248-.069.497-.076.745-.002.062-.002.123-.001.185.004.496.092.983.256 1.447.019.054.04.106.061.16.091.228.194.45.321.661.001.001.001.003.002.004.194.321.429.62.704.889h-.71v1.286h2.571c.355 0 .643-.287.643-.643 0-.053-.006-.105-.019-.156l-.643-2.571-1.248.313.181.721c-.54-.591-.841-1.362-.843-2.163 0-.442.09-.863.251-1.246.08-.189.178-.369.291-.537.001-.005.003-.009.005-.013.348-.516.841-.924 1.42-1.168.384-.162.805-.251 1.247-.251 1.775 0 3.214 1.439 3.214 3.214-.001.853-.34 1.669-.942 2.271l.91.91c1.363-1.363 1.706-3.442.853-5.171z"/><path d="m5.616 10.33c.502-2.522 2.553-4.443 5.103-4.778.199-.026.399-.043.598-.049l.16-.002h.1c1.182.015 2.294.375 3.236 1 .369-.894.191-1.959-.535-2.686-.378-.377-.868-.622-1.397-.697-.074-.529-.318-1.019-.695-1.397-.455-.453-1.067-.711-1.707-.721-.667-.01-1.309.25-1.782.72-.828.829-.96 2.126-.314 3.105l-3.558 3.561c-.978-.646-2.274-.515-3.103.312-.963.962-.963 2.524 0 3.487.378.377.868.621 1.396.695.075.529.319 1.02.696 1.396.632.633 1.52.842 2.329.645v-.208c0-.14.019-.275.055-.403-.639-1.202-.856-2.601-.582-3.98z"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@ -1 +1 @@
|
||||
<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".9961"><path d="m10.857 14.714h-1.662l.83-.831-.908-.909-.832.832v-1.663c0-.355-.288-.643-.643-.643s-.642.287-.642.643v2.383.832c0 .355.288.642.643.642h3.214c.355 0 .643-.287.643-.643s-.287-.643-.643-.643z"/><path d="m15.357 7h-.832-2.383c-.355 0-.642.288-.642.643s.287.643.643.643h1.663l-.832.832.909.908.831-.83v1.662c0 .355.288.643.644.643s.642-.288.642-.644v-3.214c0-.355-.287-.643-.643-.643z"/><circle cx="11.5" cy="11.5" r="1.286"/><path d="m8.573 10.218 1.645-1.645c-.137-.282-.218-.596-.218-.93 0-1.182.961-2.143 2.143-2.143h2.852c-.014-.611-.25-1.218-.717-1.685-.378-.377-.868-.622-1.397-.697-.074-.529-.318-1.019-.695-1.397-.455-.453-1.067-.711-1.707-.721-.667-.01-1.309.25-1.782.72-.828.829-.96 2.126-.314 3.105l-3.558 3.561c-.978-.646-2.274-.515-3.103.312-.963.962-.963 2.524 0 3.487.378.377.868.621 1.396.695.075.529.319 1.02.696 1.396.467.467 1.074.703 1.685.717v-2.852c.001-1.18.962-2.141 2.144-2.141.334 0 .648.081.93.218z"/></g></svg>
|
||||
<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".9961"><path d="m10.857 14.714h-1.662l.83-.831-.908-.909-.832.832v-1.663c0-.355-.288-.643-.643-.643s-.642.287-.642.643v2.383.832c0 .355.288.642.643.642h3.214c.355 0 .643-.287.643-.643s-.287-.643-.643-.643z"/><path d="m15.357 7h-.832-2.383c-.355 0-.642.288-.642.643s.287.643.643.643h1.663l-.832.832.909.908.831-.83v1.662c0 .355.288.643.644.643s.642-.288.642-.644v-3.214c0-.355-.287-.643-.643-.643z"/><circle cx="11.5" cy="11.5" r="1.286"/><path d="m8.573 10.218 1.645-1.645c-.137-.282-.218-.596-.218-.93 0-1.182.961-2.143 2.143-2.143h2.852c-.014-.611-.25-1.218-.717-1.685-.378-.377-.868-.622-1.397-.697-.074-.529-.318-1.019-.695-1.397-.455-.453-1.067-.711-1.707-.721-.667-.01-1.309.25-1.782.72-.828.829-.96 2.126-.314 3.105l-3.558 3.561c-.978-.646-2.274-.515-3.103.312-.963.962-.963 2.524 0 3.487.378.377.868.621 1.396.695.075.529.319 1.02.696 1.396.467.467 1.074.703 1.685.717v-2.852c.001-1.18.962-2.141 2.144-2.141.334 0 .648.081.93.218z"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@ -1 +1 @@
|
||||
<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".9961"><path d="m16 11.46-6.142-2.527-1.572-.647.647 1.572 2.527 6.142.913-2.72 1.815 1.817.91-.909-1.818-1.815z"/><path d="m7.784 11.008-.886-2.152c-.23-.56-.102-1.203.327-1.631.287-.287.67-.439 1.061-.439.192 0 .386.037.57.113l2.151.885.17-.17c.977.645 2.271.516 3.1-.311.964-.963.964-2.524 0-3.488-.377-.377-.867-.622-1.396-.697-.074-.529-.318-1.019-.695-1.397-.455-.453-1.067-.711-1.707-.721-.667-.01-1.309.25-1.782.72-.828.829-.96 2.126-.314 3.105l-3.558 3.561c-.978-.646-2.274-.515-3.103.312-.963.962-.963 2.524 0 3.487.378.377.868.621 1.396.695.075.529.319 1.02.696 1.396.963.964 2.525.964 3.488 0 .828-.828.96-2.125.314-3.104z"/></g></svg>
|
||||
<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".9961"><path d="m16 11.46-6.142-2.527-1.572-.647.647 1.572 2.527 6.142.913-2.72 1.815 1.817.91-.909-1.818-1.815z"/><path d="m7.784 11.008-.886-2.152c-.23-.56-.102-1.203.327-1.631.287-.287.67-.439 1.061-.439.192 0 .386.037.57.113l2.151.885.17-.17c.977.645 2.271.516 3.1-.311.964-.963.964-2.524 0-3.488-.377-.377-.867-.622-1.396-.697-.074-.529-.318-1.019-.695-1.397-.455-.453-1.067-.711-1.707-.721-.667-.01-1.309.25-1.782.72-.828.829-.96 2.126-.314 3.105l-3.558 3.561c-.978-.646-2.274-.515-3.103.312-.963.962-.963 2.524 0 3.487.378.377.868.621 1.396.695.075.529.319 1.02.696 1.396.963.964 2.525.964 3.488 0 .828-.828.96-2.125.314-3.104z"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 796 B After Width: | Height: | Size: 797 B |
@ -40,4 +40,4 @@ void SkeletonEditorModulePlugin::_notification(int p_what) {
|
||||
SpatialEditor::get_singleton()->remove_gizmo_plugin(original_plugin);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1864,4 +1864,4 @@ bool ModuleSkeletonEditor::_gizmo_select(int p_index, const Vector2 &p_screenpos
|
||||
se->select_gizmo_highlight_axis(-1);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ In case it's needed later
|
||||
|
||||
+void Skeleton::_get_property_list(List<PropertyInfo> *p_list) const {
|
||||
for (int i = 0; i < bones.size(); i++) {
|
||||
|
||||
|
||||
String prep = "bones/" + itos(i) + "/";
|
||||
- p_list->push_back(PropertyInfo(Variant::STRING, prep + "name"));
|
||||
- p_list->push_back(PropertyInfo(Variant::INT, prep + "parent", PROPERTY_HINT_RANGE, "-1," + itos(bones.size() - 1) + ",1"));
|
||||
@ -16,4 +16,4 @@ In case it's needed later
|
||||
- p_list->push_back(PropertyInfo(Variant::ARRAY, prep + "bound_children"));
|
||||
+ p_list->push_back(PropertyInfo(Variant::ARRAY, prep + "bound_children", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
modules/terraman/.gitignore
vendored
@ -5,4 +5,4 @@
|
||||
*.obj
|
||||
*.pyc
|
||||
*.bc
|
||||
*.os
|
||||
*.os
|
||||
|
@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
||||
|
@ -52,7 +52,7 @@ For example lod level 5 will try to get material index 5, but if you only have 3
|
||||
The simplest library, just assign a material with a texture, and using the atlas_rows and atlas_culomns properties to tell the system
|
||||
how the UVs should be divided.
|
||||
|
||||
This is the basic Minecraft-style lib rary. Use this if you just have one texture atlas.
|
||||
This is the basic Minecraft-style lib rary. Use this if you just have one texture atlas.
|
||||
|
||||
### TerraLibraryMerger
|
||||
|
||||
@ -95,7 +95,7 @@ You can write your own algorithm by implementing the ``` void _generate_chunk(ch
|
||||
## TerraJobs
|
||||
|
||||
Producing just a terrain mesh for a chunk is not that hard by itself. However when you start adding layers/features
|
||||
like lod generation, collision meshes (especially since manipulating the physics server is not threadsafe),
|
||||
like lod generation, collision meshes (especially since manipulating the physics server is not threadsafe),
|
||||
vertex lights, props, snapping props, props with vertex lights, etc
|
||||
chunk mesh generation can quicly become a serious mess.
|
||||
|
||||
@ -140,10 +140,10 @@ Since properly initializing a chunk usually takes quite a few steps that you pro
|
||||
parameter was added. This means you can just call the super `_create_chunk` methods, and you won't need to worry about your chunk
|
||||
getting overridden. Like:
|
||||
|
||||
Note that `_create_chunk` is also responsible for initializing chunks if you have them stored inside a scene.
|
||||
Note that `_create_chunk` is also responsible for initializing chunks if you have them stored inside a scene.
|
||||
This is done by `setup_chunk(shunk)` in `TerraWorld`.
|
||||
|
||||
```
|
||||
```
|
||||
func _create_chunk(x : int, y : int, z : int, chunk : TerraChunk) -> TerraChunk:
|
||||
if !chunk:
|
||||
chunk = MyChunk.new()
|
||||
|
@ -28,7 +28,7 @@ sources = [
|
||||
"library/terrain_library.cpp",
|
||||
"library/terrain_library_simple.cpp",
|
||||
"library/terrain_material_cache.cpp",
|
||||
|
||||
|
||||
"nodes/terrain_light_node.cpp",
|
||||
|
||||
"library/terrain_surface.cpp",
|
||||
@ -59,7 +59,7 @@ sources = [
|
||||
"areas/terrain_world_area.cpp",
|
||||
|
||||
"world/terrain_world_editor.cpp",
|
||||
|
||||
|
||||
"thirdparty/lz4/lz4.c",
|
||||
|
||||
"world/jobs/terrain_job.cpp",
|
||||
|
@ -51,7 +51,7 @@ def get_doc_classes():
|
||||
|
||||
"TerrainWorldMarchingCubes",
|
||||
"TerrainChunkMarchingCubes",
|
||||
|
||||
|
||||
"TerrainMesherCubic",
|
||||
"TerrainWorldCubic",
|
||||
"TerrainChunkCubic",
|
||||
@ -66,7 +66,7 @@ def get_doc_classes():
|
||||
|
||||
"TerrainEnvironmentData",
|
||||
"TerrainMesherJobStep",
|
||||
|
||||
|
||||
]
|
||||
|
||||
|
||||
|
@ -197,4 +197,4 @@ typedef class RenderingServer VS;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1 +1 @@
|
||||
Doc classes will appear here when generating
|
||||
Doc classes will appear here when generating
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
I_____I/
|
||||
|
||||
|
||||
I y
|
||||
I y
|
||||
I I
|
||||
O----- x I B
|
||||
/ I F I /
|
||||
|
@ -135,7 +135,7 @@ public:
|
||||
|
||||
bool get_is_liquid_mesher() const;
|
||||
void set_is_liquid_mesher(const bool value);
|
||||
|
||||
|
||||
void reset();
|
||||
|
||||
void add_chunk(Ref<TerrainChunk> chunk);
|
||||
|
@ -115,4 +115,4 @@ TerrainWorldBlocky ::~TerrainWorldBlocky() {
|
||||
}
|
||||
|
||||
void TerrainWorldBlocky::_bind_methods() {
|
||||
}
|
||||
}
|
||||
|
@ -350,4 +350,4 @@ void TerrainWorldDefault::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("_update_lods"), &TerrainWorldDefault::_update_lods);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_vertex_colors", "transform", "vertices", "base_light_value", "ao_strength"), &TerrainWorldDefault::get_vertex_colors, DEFVAL(0.45), DEFVAL(0.2));
|
||||
}
|
||||
}
|
||||
|
@ -450,4 +450,4 @@ void TerrainJob::execute() {
|
||||
call("_execute");
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -371,7 +371,7 @@ void TerrainWorldEditorPlugin::_notification(int p_what) {
|
||||
case 1: { // Right.
|
||||
SpatialEditor::get_singleton()->get_palette_split()->move_child(voxel_world_editor, 1);
|
||||
} break;
|
||||
#else
|
||||
#else
|
||||
case 0: { // Left.
|
||||
SpatialEditor::get_singleton()->move_control_to_left_panel(voxel_world_editor);
|
||||
} break;
|
||||
|
2
modules/terraman_2d/.gitignore
vendored
@ -5,4 +5,4 @@
|
||||
*.obj
|
||||
*.pyc
|
||||
*.bc
|
||||
*.os
|
||||
*.os
|
||||
|
@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
||||
|
@ -52,7 +52,7 @@ For example lod level 5 will try to get material index 5, but if you only have 3
|
||||
The simplest library, just assign a material with a texture, and using the atlas_rows and atlas_culomns properties to tell the system
|
||||
how the UVs should be divided.
|
||||
|
||||
This is the basic Minecraft-style lib rary. Use this if you just have one texture atlas.
|
||||
This is the basic Minecraft-style lib rary. Use this if you just have one texture atlas.
|
||||
|
||||
### TerraLibraryMerger
|
||||
|
||||
@ -95,7 +95,7 @@ You can write your own algorithm by implementing the ``` void _generate_chunk(ch
|
||||
## TerraJobs
|
||||
|
||||
Producing just a terrain mesh for a chunk is not that hard by itself. However when you start adding layers/features
|
||||
like lod generation, collision meshes (especially since manipulating the physics server is not threadsafe),
|
||||
like lod generation, collision meshes (especially since manipulating the physics server is not threadsafe),
|
||||
vertex lights, props, snapping props, props with vertex lights, etc
|
||||
chunk mesh generation can quicly become a serious mess.
|
||||
|
||||
@ -140,10 +140,10 @@ Since properly initializing a chunk usually takes quite a few steps that you pro
|
||||
parameter was added. This means you can just call the super `_create_chunk` methods, and you won't need to worry about your chunk
|
||||
getting overridden. Like:
|
||||
|
||||
Note that `_create_chunk` is also responsible for initializing chunks if you have them stored inside a scene.
|
||||
Note that `_create_chunk` is also responsible for initializing chunks if you have them stored inside a scene.
|
||||
This is done by `setup_chunk(shunk)` in `TerraWorld`.
|
||||
|
||||
```
|
||||
```
|
||||
func _create_chunk(x : int, y : int, z : int, chunk : TerraChunk) -> TerraChunk:
|
||||
if !chunk:
|
||||
chunk = MyChunk.new()
|
||||
|
@ -28,7 +28,7 @@ sources = [
|
||||
"library/terrain_2d_library.cpp",
|
||||
"library/terrain_2d_library_simple.cpp",
|
||||
"library/terrain_2d_material_cache.cpp",
|
||||
|
||||
|
||||
"nodes/terrain_2d_light_node.cpp",
|
||||
|
||||
"library/terrain_2d_surface.cpp",
|
||||
@ -63,7 +63,7 @@ sources = [
|
||||
"areas/terrain_2d_world_area.cpp",
|
||||
|
||||
"world/terrain_2d_world_editor.cpp",
|
||||
|
||||
|
||||
"thirdparty/lz4/lz4.c",
|
||||
|
||||
"world/jobs/terrain_2d_job.cpp",
|
||||
|
@ -55,7 +55,7 @@ def get_doc_classes():
|
||||
|
||||
"Terrain2DWorldMarchingCubes",
|
||||
"Terrain2DChunkMarchingCubes",
|
||||
|
||||
|
||||
"Terrain2DMesherCubic",
|
||||
"Terrain2DWorldCubic",
|
||||
"Terrain2DChunkCubic",
|
||||
@ -70,7 +70,7 @@ def get_doc_classes():
|
||||
|
||||
"Terrain2DEnvironmentData",
|
||||
"Terrain2DMesherJobStep",
|
||||
|
||||
|
||||
]
|
||||
|
||||
|
||||
|
@ -195,4 +195,4 @@ typedef class RenderingServer VS;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1 +1 @@
|
||||
Doc classes will appear here when generating
|
||||
Doc classes will appear here when generating
|
||||
|
@ -638,7 +638,7 @@ Ref<Shape2D> Terrain2DMesherIsometric::create_terrain_tile_collider_shape(Ref<Te
|
||||
points.push_back(mesh_transform_terrain.xform(Vector2(0, _cell_size_y)));
|
||||
points.push_back(mesh_transform_terrain.xform(Vector2(_cell_size_x, _cell_size_y)));
|
||||
points.push_back(mesh_transform_terrain.xform(Vector2(_cell_size_x, 0)));
|
||||
|
||||
|
||||
sh->set_points(points);
|
||||
|
||||
return sh;
|
||||
|
@ -226,4 +226,4 @@ void Terrain2DWorldDefault::_bind_methods() {
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "build_flags", PROPERTY_HINT_FLAGS, Terrain2DChunkDefault::BINDING_STRING_BUILD_FLAGS), "set_build_flags", "get_build_flags");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_vertex_colors", "transform", "vertices", "base_light_value", "ao_strength"), &Terrain2DWorldDefault::get_vertex_colors, DEFVAL(0.45), DEFVAL(0.2));
|
||||
}
|
||||
}
|
||||
|
@ -69,4 +69,4 @@ Terrain2DWorldIsometric ::~Terrain2DWorldIsometric() {
|
||||
}
|
||||
|
||||
void Terrain2DWorldIsometric::_bind_methods() {
|
||||
}
|
||||
}
|
||||
|
@ -425,4 +425,4 @@ void Terrain2DJob::execute() {
|
||||
call("_execute");
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -69,4 +69,4 @@ Terrain2DWorldSimple ::~Terrain2DWorldSimple() {
|
||||
}
|
||||
|
||||
void Terrain2DWorldSimple::_bind_methods() {
|
||||
}
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ void Terrain2DWorldEditorPlugin::_notification(int p_what) {
|
||||
case 1: { // Right.
|
||||
SpatialEditor::get_singleton()->get_palette_split()->move_child(voxel_world_editor, 1);
|
||||
} break;
|
||||
#else
|
||||
#else
|
||||
case 0: { // Left.
|
||||
SpatialEditor::get_singleton()->move_control_to_left_panel(voxel_world_editor);
|
||||
} break;
|
||||
|
@ -8,12 +8,12 @@ It uses the legacy version of [rectpack2D](https://github.com/TeamHypersomnia/re
|
||||
|
||||
It should work on all platforms.
|
||||
|
||||
It supports both godot 3.2 and 4.0 (master [last tested commit](https://github.com/godotengine/godot/commit/b7e10141197fdd9b0dbc4cfa7890329510d36540)). Note that since 4.0 is still in very early stages I only
|
||||
It supports both godot 3.2 and 4.0 (master [last tested commit](https://github.com/godotengine/godot/commit/b7e10141197fdd9b0dbc4cfa7890329510d36540)). Note that since 4.0 is still in very early stages I only
|
||||
check whether it works from time to time.
|
||||
|
||||
# Pre-built binaries
|
||||
|
||||
You can grab a pre-built editor binary from the [Broken Seals](https://github.com/Relintai/broken_seals/releases)
|
||||
You can grab a pre-built editor binary from the [Broken Seals](https://github.com/Relintai/broken_seals/releases)
|
||||
repo, should you want to. It contains all my modules.
|
||||
|
||||
# Building
|
||||
@ -53,14 +53,14 @@ Supports filters, custom background color, margins.
|
||||
|
||||
### The keep_original_atlases option:
|
||||
|
||||
If you set this to true, and then add AtlasTextures, TexturePacker will change these ones (the ones you actually added)
|
||||
If you set this to true, and then add AtlasTextures, TexturePacker will change these ones (the ones you actually added)
|
||||
after the bake.
|
||||
|
||||
You can use this to bake gui textures together, without changing the resources everywhere at runtime.
|
||||
Think of rpgs, when you have a huge number of potential icons that the player can put on his or her actionbars.
|
||||
You can take look at Tales of Maj'Eyal or pretty much every actually complex MMORPGs as an example.
|
||||
|
||||
Note: Doing something like this in only recommended, if you can't pre-make the atlases (or it's really unfeasible), you are better off
|
||||
Note: Doing something like this in only recommended, if you can't pre-make the atlases (or it's really unfeasible), you are better off
|
||||
making the atlases yourself during development.
|
||||
|
||||
## TextureMerger
|
||||
@ -92,7 +92,7 @@ change to the first added texture's size.
|
||||
|
||||
add_texture looks like this:
|
||||
|
||||
```
|
||||
```
|
||||
void add_texture(Ref<Texture> p_texture, Color p_color = Color(1, 1, 1, 1), Vector2 p_position = Vector2(), Rect2 p_rect = Rect2());
|
||||
```
|
||||
|
||||
@ -101,5 +101,5 @@ With the position parameter you can offset your texture (in the resulted texture
|
||||
|
||||
There are setters to manipulate the added data later.
|
||||
|
||||
After the merge, you can either use `get_result_as_texture()` (it creates an ImageTexture on the fly), or the `data` property to
|
||||
After the merge, you can either use `get_result_as_texture()` (it creates an ImageTexture on the fly), or the `data` property to
|
||||
grab the resulting Image.
|
||||
|
@ -10,14 +10,14 @@ No crashes so far and works quite fast.
|
||||
|
||||
Copied from: http://gamedev.stackexchange.com/a/34193/16982
|
||||
|
||||
[This algorithm][1] should meet every gamedeving needs.
|
||||
It's very, very efficient, lightweight, and I've myself improved it with searching the best possible sorting function
|
||||
(whether it's by area, perimeter, width, height, max(width, height))
|
||||
[This algorithm][1] should meet every gamedeving needs.
|
||||
It's very, very efficient, lightweight, and I've myself improved it with searching the best possible sorting function
|
||||
(whether it's by area, perimeter, width, height, max(width, height))
|
||||
and the best possible bin size so **you don't have to hardcode the width/height yourself anymore**.
|
||||
|
||||
It's also easy to design it so it automatically portions out your rectangles into more bins
|
||||
if one with fixed maximum size is not sufficient, so you probably want to pass all your textures to it
|
||||
and pass a maximum texture size as the value for maximum bins' dimension, and BAM !
|
||||
and pass a maximum texture size as the value for maximum bins' dimension, and BAM !
|
||||
You have your texture atlases ready to be uploaded to GPU. Same goes for font packing.
|
||||
|
||||
400 random rectangles, automatically divided into 3 bins of maximum 400x400 size:
|
||||
|
@ -46,7 +46,7 @@ int discard_step = 128;
|
||||
For every sorting function, algorithm will perform packing attempts beginning with a bin with width and height equal to max_side,
|
||||
and decreasing its dimensions if it finds out that rectangles did actually fit, increasing otherwise.
|
||||
Although, it's doing that in sort of binary search manner, so for every comparing function it will perform at most log2(max_side) packing attempts looking for the smallest possible bin size.
|
||||
discard_step = 128 means that the algorithm will break of the searching loop if the rectangles fit but "it may be possible to fit them in a bin smaller by 128"
|
||||
discard_step = 128 means that the algorithm will break of the searching loop if the rectangles fit but "it may be possible to fit them in a bin smaller by 128"
|
||||
the bigger the value, the sooner the algorithm will finish but the rectangles will be packed less tightly.
|
||||
use discard_step = 1 for maximum tightness.
|
||||
|
||||
|
2
modules/thread_pool/.gitignore
vendored
@ -5,4 +5,4 @@
|
||||
*.obj
|
||||
*.pyc
|
||||
*.bc
|
||||
*.os
|
||||
*.os
|
||||
|